From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH v3 06/14] filesystem-dax: convert to dax_flush() Date: Wed, 14 Jun 2017 12:56:35 +0200 Message-ID: <20170614105635.GF21506@quack2.suse.cz> References: <149703982465.20620.14881139332926778446.stgit@dwillia2-desk3.amr.corp.intel.com> <149703985873.20620.14408850278717601623.stgit@dwillia2-desk3.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <149703985873.20620.14408850278717601623.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Dan Williams Cc: Jan Kara , Matthew Wilcox , x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, hch-jcswGhMUV9g@public.gmane.org List-Id: dm-devel.ids On Fri 09-06-17 13:24:18, Dan Williams wrote: > Filesystem-DAX flushes caches whenever it writes to the address returned > through dax_direct_access() and when writing back dirty radix entries. > That flushing is only required in the pmem case, so the dax_flush() > helper skips cache management work when the underlying driver does not > specify a flush method. > > We still do all the dirty tracking since the radix entry will already be > there for locking purposes. However, the work to clean the entry will be > a nop for some dax drivers. > > Cc: Jan Kara > Cc: Jeff Moyer > Cc: Christoph Hellwig > Cc: Matthew Wilcox > Cc: Ross Zwisler > Signed-off-by: Dan Williams Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/dax.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/dax.c b/fs/dax.c > index b459948de427..0933fc460ada 100644 > --- a/fs/dax.c > +++ b/fs/dax.c > @@ -784,7 +784,7 @@ static int dax_writeback_one(struct block_device *bdev, > } > > dax_mapping_entry_mkclean(mapping, index, pfn_t_to_pfn(pfn)); > - wb_cache_pmem(kaddr, size); > + dax_flush(dax_dev, pgoff, kaddr, size); > /* > * After we have flushed the cache, we can clear the dirty tag. There > * cannot be new dirty data in the pfn after the flush has completed as > -- Jan Kara SUSE Labs, CR