Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-04-08 Thread Shiyang Ruan
在 2022/4/8 9:38, Dan Williams 写道: [ add Mauro and Tony for RAS discussion ] On Wed, Apr 6, 2022 at 1:39 PM Darrick J. Wong wrote: On Tue, Apr 05, 2022 at 06:22:48PM -0700, Dan Williams wrote: On Tue, Apr 5, 2022 at 5:55 PM Jane Chu wrote: On 3/30/2022 9:18 AM, Darrick J. Wong wrote:

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-04-07 Thread Dan Williams
[ add Mauro and Tony for RAS discussion ] On Wed, Apr 6, 2022 at 1:39 PM Darrick J. Wong wrote: > > On Tue, Apr 05, 2022 at 06:22:48PM -0700, Dan Williams wrote: > > On Tue, Apr 5, 2022 at 5:55 PM Jane Chu wrote: > > > > > > On 3/30/2022 9:18 AM, Darrick J. Wong wrote: > > > > On Wed, Mar 30,

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-04-06 Thread Darrick J. Wong
On Tue, Apr 05, 2022 at 06:22:48PM -0700, Dan Williams wrote: > On Tue, Apr 5, 2022 at 5:55 PM Jane Chu wrote: > > > > On 3/30/2022 9:18 AM, Darrick J. Wong wrote: > > > On Wed, Mar 30, 2022 at 08:49:29AM -0700, Christoph Hellwig wrote: > > >> On Wed, Mar 30, 2022 at 06:58:21PM +0800, Shiyang

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-04-05 Thread Dan Williams
On Tue, Apr 5, 2022 at 5:55 PM Jane Chu wrote: > > On 3/30/2022 9:18 AM, Darrick J. Wong wrote: > > On Wed, Mar 30, 2022 at 08:49:29AM -0700, Christoph Hellwig wrote: > >> On Wed, Mar 30, 2022 at 06:58:21PM +0800, Shiyang Ruan wrote: > >>> As the code I pasted before, pmem driver will subtract

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-04-05 Thread Jane Chu
On 3/30/2022 9:18 AM, Darrick J. Wong wrote: > On Wed, Mar 30, 2022 at 08:49:29AM -0700, Christoph Hellwig wrote: >> On Wed, Mar 30, 2022 at 06:58:21PM +0800, Shiyang Ruan wrote: >>> As the code I pasted before, pmem driver will subtract its ->data_offset, >>> which is byte-based. And the

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-03-30 Thread Darrick J. Wong
On Wed, Mar 30, 2022 at 08:49:29AM -0700, Christoph Hellwig wrote: > On Wed, Mar 30, 2022 at 06:58:21PM +0800, Shiyang Ruan wrote: > > As the code I pasted before, pmem driver will subtract its ->data_offset, > > which is byte-based. And the filesystem who implements ->notify_failure() > > will

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-03-30 Thread Christoph Hellwig
On Wed, Mar 30, 2022 at 06:58:21PM +0800, Shiyang Ruan wrote: > As the code I pasted before, pmem driver will subtract its ->data_offset, > which is byte-based. And the filesystem who implements ->notify_failure() > will calculate the offset in unit of byte again. > > So, leave its function

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-03-30 Thread Shiyang Ruan
在 2022/3/30 18:13, Christoph Hellwig 写道: On Wed, Mar 30, 2022 at 06:03:01PM +0800, Shiyang Ruan wrote: Because I am not sure if the offset between each layer is page aligned. For example, when pmem dirver handles ->memory_failure(), it should subtract its ->data_offset when it calls

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-03-30 Thread Christoph Hellwig
On Wed, Mar 30, 2022 at 06:03:01PM +0800, Shiyang Ruan wrote: > > Because I am not sure if the offset between each layer is page aligned. For > example, when pmem dirver handles ->memory_failure(), it should subtract its > ->data_offset when it calls dax_holder_notify_failure(). If they aren't,

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-03-30 Thread Shiyang Ruan
在 2022/3/30 13:41, Christoph Hellwig 写道: On Wed, Mar 16, 2022 at 09:46:07PM +0800, Shiyang Ruan wrote: Forgive me if this has been discussed before, but since dax_operations are in terms of pgoff and nr pages and memory_failure() is in terms of pfns what was the rationale for making the

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-03-29 Thread Christoph Hellwig
On Wed, Mar 16, 2022 at 09:46:07PM +0800, Shiyang Ruan wrote: > > Forgive me if this has been discussed before, but since dax_operations > > are in terms of pgoff and nr pages and memory_failure() is in terms of > > pfns what was the rationale for making the function signature byte > > based? > >

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-03-29 Thread Christoph Hellwig
On Fri, Mar 11, 2022 at 03:35:13PM -0800, Dan Williams wrote: > > + if (!dax_dev->holder_ops) { > > + rc = -EOPNOTSUPP; > > I think it is ok to return success (0) for this case. All the caller > of dax_holder_notify_failure() wants to know is if the notification > was

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-03-16 Thread Shiyang Ruan
在 2022/3/12 7:35, Dan Williams 写道: On Sun, Feb 27, 2022 at 4:08 AM Shiyang Ruan wrote: To easily track filesystem from a pmem device, we introduce a holder for dax_device structure, and also its operation. This holder is used to remember who is using this dax_device: - When it is the

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-03-11 Thread Dan Williams
On Sun, Feb 27, 2022 at 4:08 AM Shiyang Ruan wrote: > > To easily track filesystem from a pmem device, we introduce a holder for > dax_device structure, and also its operation. This holder is used to > remember who is using this dax_device: > - When it is the backend of a filesystem, the holder

[PATCH v11 1/8] dax: Introduce holder for dax_device

2022-02-27 Thread Shiyang Ruan
To easily track filesystem from a pmem device, we introduce a holder for dax_device structure, and also its operation. This holder is used to remember who is using this dax_device: - When it is the backend of a filesystem, the holder will be the instance of this filesystem. - When this pmem