Re: [RFC PATCH v3 8/9] md: Implement ->corrupted_range()

2021-01-08 Thread Darrick J. Wong
On Fri, Jan 08, 2021 at 05:52:11PM +0800, Ruan Shiyang wrote: > > > On 2021/1/5 上午7:34, Darrick J. Wong wrote: > > On Fri, Dec 18, 2020 at 10:11:54AM +0800, Ruan Shiyang wrote: > > > > > > > > > On 2020/12/16 上午4:51, Darrick J. Wong wrote: > > > > On Tue, Dec 15, 2020 at 08:14:13PM +0800,

Re: [RFC PATCH v3 8/9] md: Implement ->corrupted_range()

2021-01-08 Thread Ruan Shiyang
On 2021/1/5 上午7:34, Darrick J. Wong wrote: On Fri, Dec 18, 2020 at 10:11:54AM +0800, Ruan Shiyang wrote: On 2020/12/16 上午4:51, Darrick J. Wong wrote: On Tue, Dec 15, 2020 at 08:14:13PM +0800, Shiyang Ruan wrote: With the support of ->rmap(), it is possible to obtain the superblock on a

Re: [RFC PATCH v3 8/9] md: Implement ->corrupted_range()

2021-01-04 Thread Darrick J. Wong
On Fri, Dec 18, 2020 at 10:11:54AM +0800, Ruan Shiyang wrote: > > > On 2020/12/16 上午4:51, Darrick J. Wong wrote: > > On Tue, Dec 15, 2020 at 08:14:13PM +0800, Shiyang Ruan wrote: > > > With the support of ->rmap(), it is possible to obtain the superblock on > > > a mapped device. > > > > > > If

Re: [RFC PATCH v3 8/9] md: Implement ->corrupted_range()

2020-12-17 Thread Ruan Shiyang
On 2020/12/16 上午4:51, Darrick J. Wong wrote: On Tue, Dec 15, 2020 at 08:14:13PM +0800, Shiyang Ruan wrote: With the support of ->rmap(), it is possible to obtain the superblock on a mapped device. If a pmem device is used as one target of mapped device, we cannot obtain its superblock

Re: [RFC PATCH v3 8/9] md: Implement ->corrupted_range()

2020-12-17 Thread Ruan Shiyang
On 2020/12/16 下午1:43, Jane Chu wrote: On 12/15/2020 4:14 AM, Shiyang Ruan wrote:   #ifdef CONFIG_SYSFS +int bd_disk_holder_corrupted_range(struct block_device *bdev, loff_t off, +   size_t len, void *data);   int bd_link_disk_holder(struct block_device *bdev, struct gendisk

Re: [RFC PATCH v3 8/9] md: Implement ->corrupted_range()

2020-12-15 Thread Jane Chu
On 12/15/2020 4:14 AM, Shiyang Ruan wrote: #ifdef CONFIG_SYSFS +int bd_disk_holder_corrupted_range(struct block_device *bdev, loff_t off, + size_t len, void *data); int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk); void

Re: [RFC PATCH v3 8/9] md: Implement ->corrupted_range()

2020-12-15 Thread Dave Chinner
On Tue, Dec 15, 2020 at 12:51:02PM -0800, Darrick J. Wong wrote: > On Tue, Dec 15, 2020 at 08:14:13PM +0800, Shiyang Ruan wrote: > > diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c > > index 4688bff19c20..e8cfaf860149 100644 > > --- a/drivers/nvdimm/pmem.c > > +++

Re: [RFC PATCH v3 8/9] md: Implement ->corrupted_range()

2020-12-15 Thread Darrick J. Wong
On Tue, Dec 15, 2020 at 08:14:13PM +0800, Shiyang Ruan wrote: > With the support of ->rmap(), it is possible to obtain the superblock on > a mapped device. > > If a pmem device is used as one target of mapped device, we cannot > obtain its superblock directly. With the help of SYSFS, the mapped

[RFC PATCH v3 8/9] md: Implement ->corrupted_range()

2020-12-15 Thread Shiyang Ruan
With the support of ->rmap(), it is possible to obtain the superblock on a mapped device. If a pmem device is used as one target of mapped device, we cannot obtain its superblock directly. With the help of SYSFS, the mapped device can be found on the target devices. So, we iterate the