diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2012-06-25 13:15:38 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-07-24 09:14:28 -0400 |
commit | a73ff3231df59a4b92ccd0dd4e73897c5822489b (patch) | |
tree | b4a702fefd94689682a6be89773ef7c59f20db59 /drivers/block/drbd/drbd_req.c | |
parent | db141b2f42b485b700465fe2401fbe65c65b190c (diff) |
drbd: announce FLUSH/FUA capability to upper layers
Unconditionally announce FLUSH/FUA to upper layers.
If the lower layers on either node do not actually support this,
generic_make_request() will deal with it.
If this causes performance regressions on your setup,
make sure there are no volatile caches involved,
and mount -o nobarrier or equivalent.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_req.c')
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 1f4b2dbb7d4a..910335c30927 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c | |||
@@ -1111,13 +1111,12 @@ void drbd_make_request(struct request_queue *q, struct bio *bio) | |||
1111 | /* | 1111 | /* |
1112 | * what we "blindly" assume: | 1112 | * what we "blindly" assume: |
1113 | */ | 1113 | */ |
1114 | D_ASSERT(bio->bi_size > 0); | ||
1115 | D_ASSERT((bio->bi_size & 0x1ff) == 0); | 1114 | D_ASSERT((bio->bi_size & 0x1ff) == 0); |
1116 | 1115 | ||
1117 | /* to make some things easier, force alignment of requests within the | 1116 | /* to make some things easier, force alignment of requests within the |
1118 | * granularity of our hash tables */ | 1117 | * granularity of our hash tables */ |
1119 | s_enr = bio->bi_sector >> HT_SHIFT; | 1118 | s_enr = bio->bi_sector >> HT_SHIFT; |
1120 | e_enr = (bio->bi_sector+(bio->bi_size>>9)-1) >> HT_SHIFT; | 1119 | e_enr = bio->bi_size ? (bio->bi_sector+(bio->bi_size>>9)-1) >> HT_SHIFT : s_enr; |
1121 | 1120 | ||
1122 | if (likely(s_enr == e_enr)) { | 1121 | if (likely(s_enr == e_enr)) { |
1123 | do { | 1122 | do { |