Patch "block: update the stable_writes flag in bdev_add" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    block: update the stable_writes flag in bdev_add

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     block-update-the-stable_writes-flag-in-bdev_add.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ca407af96bf27eaed9cbd89ab4084fb3f243a793
Author: Christoph Hellwig <hch@xxxxxx>
Date:   Wed Oct 25 16:10:18 2023 +0200

    block: update the stable_writes flag in bdev_add
    
    [ Upstream commit 1898efcdbed32bb1c67269c985a50bab0dbc9493 ]
    
    Propagate the per-queue stable_write flags into each bdev inode in bdev_add.
    This makes sure devices that require stable writes have it set for I/O
    on the block device node as well.
    
    Note that this doesn't cover the case of a flag changing on a live device
    yet.  We should handle that as well, but I plan to cover it as part of a
    more general rework of how changing runtime paramters on block devices
    works.
    
    Fixes: 1cb039f3dc16 ("bdi: replace BDI_CAP_STABLE_WRITES with a queue and a sb flag")
    Reported-by: Ilya Dryomov <idryomov@xxxxxxxxx>
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Link: https://lore.kernel.org/r/20231025141020.192413-3-hch@xxxxxx
    Tested-by: Ilya Dryomov <idryomov@xxxxxxxxx>
    Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>
    Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/block/bdev.c b/block/bdev.c
index f3b13aa1b7d42..04dba25b0019e 100644
--- a/block/bdev.c
+++ b/block/bdev.c
@@ -425,6 +425,8 @@ void bdev_set_nr_sectors(struct block_device *bdev, sector_t sectors)
 
 void bdev_add(struct block_device *bdev, dev_t dev)
 {
+	if (bdev_stable_writes(bdev))
+		mapping_set_stable_writes(bdev->bd_inode->i_mapping);
 	bdev->bd_dev = dev;
 	bdev->bd_inode->i_rdev = dev;
 	bdev->bd_inode->i_ino = dev;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux