]> www.infradead.org Git - users/hch/misc.git/commitdiff
xfs: set REQ_NOINTEGRITY for metadata iomap-pi
authorChristoph Hellwig <hch@lst.de>
Tue, 19 Aug 2025 17:00:21 +0000 (19:00 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 2 Sep 2025 06:40:59 +0000 (08:40 +0200)
XFS already does it's own validity checks here.

Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_buf.c
fs/xfs/xfs_log.c
fs/xfs/xfs_log_recover.c

index f9ef3b2a332a6fb4a8c55323dd4171c0e3e86061..b2e47f2d542773a10789cf591ca32fe7f1bce24a 100644 (file)
@@ -1326,7 +1326,14 @@ xfs_buf_bio_op(
                        op |= REQ_RAHEAD;
        }
 
-       return op | REQ_META;
+       /*
+        * The XFS self-describing metadata contains a crc32, an either
+        * explicitly or implicitly encoded disk address and the log sequence
+        * number for each metadata block.  Generating and verifying integrity
+        * metadata in the kernel adds no significant value, but adds additional
+        * memory allocations, context switches and on-the-wire traffic.
+        */
+       return op | REQ_META | REQ_NOINTEGRITY;
 }
 
 static void
index c8a57e21a1d3e070daa48f22ba0ad3f33137ebe0..ecacbad88184f61b3cb6cf9b73a5bc3e55f580ce 100644 (file)
@@ -1645,7 +1645,8 @@ xlog_write_iclog(
         */
        bio_init(&iclog->ic_bio, log->l_targ->bt_bdev, iclog->ic_bvec,
                 howmany(count, PAGE_SIZE),
-                REQ_OP_WRITE | REQ_META | REQ_SYNC | REQ_IDLE);
+                REQ_OP_WRITE | REQ_META | REQ_SYNC | REQ_IDLE |
+                REQ_NOINTEGRITY);
        iclog->ic_bio.bi_iter.bi_sector = log->l_logBBstart + bno;
        iclog->ic_bio.bi_end_io = xlog_bio_end_io;
        iclog->ic_bio.bi_private = iclog;
index e6ed9e09c02710ae8000ecaef5f2fc5d1c7607e5..be09842fcb392cf5ea7852b3fbea0e8d9c5ab29a 100644 (file)
@@ -138,7 +138,7 @@ xlog_do_io(
        ASSERT(nbblks > 0);
 
        error = xfs_rw_bdev(log->l_targ->bt_bdev, log->l_logBBstart + blk_no,
-                       BBTOB(nbblks), data, op);
+                       BBTOB(nbblks), data, op | REQ_NOINTEGRITY);
        if (error && !xlog_is_shutdown(log)) {
                xfs_alert(log->l_mp,
                          "log recovery %s I/O error at daddr 0x%llx len %d error %d",