[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1462991986.29294.29.camel@intel.com>
Date: Wed, 11 May 2016 18:39:59 +0000
From: "Verma, Vishal L" <vishal.l.verma@...el.com>
To: "linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"hch@...radead.org" <hch@...radead.org>,
"xfs@....sgi.com" <xfs@....sgi.com>,
"jmoyer@...hat.com" <jmoyer@...hat.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"axboe@...com" <axboe@...com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"ross.zwisler@...ux.intel.com" <ross.zwisler@...ux.intel.com>,
"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
"boaz@...xistor.com" <boaz@...xistor.com>,
"david@...morbit.com" <david@...morbit.com>,
"jack@...e.cz" <jack@...e.cz>
Subject: Re: [PATCH v6 4/5] dax: for truncate/hole-punch, do zeroing through
the driver if possible
On Tue, 2016-05-10 at 12:49 -0600, Vishal Verma wrote:
>
...
> @@ -1240,11 +1254,16 @@ int dax_zero_page_range(struct inode *inode,
> loff_t from, unsigned length,
> .size = PAGE_SIZE,
> };
>
> - if (dax_map_atomic(bdev, &dax) < 0)
> - return PTR_ERR(dax.addr);
> - clear_pmem(dax.addr + offset, length);
> - wmb_pmem();
> - dax_unmap_atomic(bdev, &dax);
> + if (dax_range_is_aligned(bdev, &dax, offset, length))
> + return blkdev_issue_zeroout(bdev, dax.sector,
> + length >> 9, GFP_NOFS, true);
Found another bug here while testing. The zeroout needs to be done for
sector + (offset >> 9). The above just zeroed out the first sector of
the page irrespective of offset, which is wrong.
Powered by blists - more mailing lists