Re: [PATCH 4/6] xfs: Set BH_New for allocated DAX blocks in __xfs_get_blocks()
On Mon, Oct 03, 2016 at 04:42:46PM +0200, Jan Kara wrote: > Ah, you are right. After reading the code again this patch is not needed > anymore because xfs_file_iomap_begin() returns IOMAP_F_NEW whenever we > allocated block regardless whether it was zeroed-out or not. But if I get it > right, all the IS_DAX checks in __xfs_get_blocks() can be dropped now, cannot > they? Right now the code is required to keep the pmd_fault handler (which is always disabled though) compiling. Once that one is gone the DAX code in __xfs_get_blocks can be removed. In fact Ross sent a patch to do just that as part of his PMD fault rework. ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH 4/6] xfs: Set BH_New for allocated DAX blocks in __xfs_get_blocks()
On Tue 27-09-16 19:13:50, Christoph Hellwig wrote: > On Tue, Sep 27, 2016 at 07:17:07PM +0200, Jan Kara wrote: > > OK, the changelog is stale but I actually took care to integrate this with > > your iomap patches and for the new invalidation code in iomap_dax_actor() > > to work we need this additional information... > > It's not just the changelogs (which will need updates on more than this > patch), but also the content. We're not using get_blocks for DAX > anymore, so this patch should not be needed anymore. Ah, you are right. After reading the code again this patch is not needed anymore because xfs_file_iomap_begin() returns IOMAP_F_NEW whenever we allocated block regardless whether it was zeroed-out or not. But if I get it right, all the IS_DAX checks in __xfs_get_blocks() can be dropped now, cannot they? Honza -- Jan KaraSUSE Labs, CR ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH 4/6] xfs: Set BH_New for allocated DAX blocks in __xfs_get_blocks()
On Tue, Sep 27, 2016 at 07:17:07PM +0200, Jan Kara wrote: > OK, the changelog is stale but I actually took care to integrate this with > your iomap patches and for the new invalidation code in iomap_dax_actor() > to work we need this additional information... It's not just the changelogs (which will need updates on more than this patch), but also the content. We're not using get_blocks for DAX anymore, so this patch should not be needed anymore. ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH 4/6] xfs: Set BH_New for allocated DAX blocks in __xfs_get_blocks()
On Tue 27-09-16 10:01:18, Christoph Hellwig wrote: > On Tue, Sep 27, 2016 at 06:43:33PM +0200, Jan Kara wrote: > > So far we did not set BH_New for newly allocated blocks for DAX inodes > > in __xfs_get_blocks() because we wanted to avoid zeroing done in generic > > DAX code which was racy. Now the zeroing is gone so we can remove this > > workaround and return BH_New for newly allocated blocks. DAX will use this > > information to properly update mappings of the file. > > __xfs_get_blocks isn't used by the DAX code any more. > xfs_file_iomap_begin should already be doing the right thing for now. OK, the changelog is stale but I actually took care to integrate this with your iomap patches and for the new invalidation code in iomap_dax_actor() to work we need this additional information... Honza -- Jan KaraSUSE Labs, CR ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH 4/6] xfs: Set BH_New for allocated DAX blocks in __xfs_get_blocks()
On Tue, Sep 27, 2016 at 06:43:33PM +0200, Jan Kara wrote: > So far we did not set BH_New for newly allocated blocks for DAX inodes > in __xfs_get_blocks() because we wanted to avoid zeroing done in generic > DAX code which was racy. Now the zeroing is gone so we can remove this > workaround and return BH_New for newly allocated blocks. DAX will use this > information to properly update mappings of the file. __xfs_get_blocks isn't used by the DAX code any more. xfs_file_iomap_begin should already be doing the right thing for now. ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm