Commit 8a6f7bb
aoe: don't call set_capacity from irq context
Updating the block device size from irq context can lead to torn
writes of the 64-bit value, and prevents us from using normal
process context locking primitives to serialize access to the 64-bit
nr_sectors value. Defer the set_capacity to the already existing
workqueue handler, where it can be merged with the update of the
block device size by using set_capacity_and_notify. As an extra
bonus this also adds proper uevent notifications for the resize.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 2ebcabf commit 8a6f7bb
1 file changed
+4
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
893 | | - | |
894 | | - | |
895 | 893 | | |
896 | 894 | | |
897 | 895 | | |
898 | 896 | | |
899 | 897 | | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
| 898 | + | |
| 899 | + | |
906 | 900 | | |
907 | 901 | | |
908 | 902 | | |
| |||
971 | 965 | | |
972 | 966 | | |
973 | 967 | | |
974 | | - | |
975 | | - | |
| 968 | + | |
976 | 969 | | |
977 | | - | |
| 970 | + | |
978 | 971 | | |
979 | 972 | | |
980 | 973 | | |
| |||
0 commit comments