Skip to contentSkip to conversation

btrfs: submit superblock io with REQ_META

PATCH Superseded David Sterba 2 participants 2 messages Aug 18, 2017 Btrfs file system

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

David Sterba

author maintainer
#0 lore raw

PATCH 1/1 btrfs: submit superblock io with REQ_META

The superblock is also metadata of the filesystem so the relevant IO should be tagged as such.

---
 fs/btrfs/disk-io.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
fs/btrfs/disk-io.c +4 -2
index 90b967ae46d0..21b55e8caf33 100644
@@ -3433,9 +3433,11 @@ static int write_dev_supers(struct btrfs_device *device,
 		 */
 		if (i == 0) {
 			ret = btrfsic_submit_bh(REQ_OP_WRITE,
-						REQ_SYNC | REQ_FUA, bh);
+						REQ_SYNC | REQ_FUA | REQ_META,
+						bh);
 		} else {
-			ret = btrfsic_submit_bh(REQ_OP_WRITE, REQ_SYNC, bh);
+			ret = btrfsic_submit_bh(REQ_OP_WRITE,
+						REQ_SYNC | REQ_META, bh);
 		}
 		if (ret)
 			errors++;
Signature · 1 line
2.14.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · David Sterba

The superblock is also metadata of the filesystem so the relevant IO should be tagged as such.

-liubo

Quoted 30 lines
---
 fs/btrfs/disk-io.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
fs/btrfs/disk-io.c +4 -2
index 90b967ae46d0..21b55e8caf33 100644
@@ -3433,9 +3433,11 @@ static int write_dev_supers(struct btrfs_device *device,
 		 */
 		if (i == 0) {
 			ret = btrfsic_submit_bh(REQ_OP_WRITE,
-						REQ_SYNC | REQ_FUA, bh);
+						REQ_SYNC | REQ_FUA | REQ_META,
+						bh);
 		} else {
-			ret = btrfsic_submit_bh(REQ_OP_WRITE, REQ_SYNC, bh);
+			ret = btrfsic_submit_bh(REQ_OP_WRITE,
+						REQ_SYNC | REQ_META, bh);
 		}
 		if (ret)
 			errors++;
Signature · 6 lines
2.14.0

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html