diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 59a732a13370..659a3b4645d2 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3494,7 +3494,8 @@ static void write_dev_flush(struct btrfs_device
*device)
struct request_queue *q = bdev_get_queue(device->bdev);
struct bio *bio = device->flush_bio;
- if (!test_bit(QUEUE_FLAG_WC, &q->queue_flags))
+ if (!test_bit(BTRFS_FS_FORCE_DEV_FLUSH, &device->fs_info->flags)
+ && !test_bit(QUEUE_FLAG_WC, &q->queue_flags))
return;
Now I understand what you meant. But the most common case in our test
set up is a device with write cache. So BTRFS_FS_FORCE_DEV_FLUSH does
not bring any additional force. IMO.
Thanks, Anand
Or one another idea is we could remove
!test_bit(QUEUE_FLAG_WC, &q->queue_flags)
which purpose is to only fail early.
If we remove it there is consistency in our code with or
with out the write cache.
Thanks, Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html