Re: [PATCH 9/9] iomap: Change calling convention for zeroing

2020-08-27 Thread Christoph Hellwig
On Tue, Aug 25, 2020 at 03:23:55PM -0700, Darrick J. Wong wrote: > Sorry for my ultra-slow response to this. The u64 length seems ok to me > (or uint64_t, I don't care all /that/ much), but using loff_t as a > return type bothers me because I see that and think that this function > is returning a

Re: [PATCH 9/9] iomap: Change calling convention for zeroing

2020-08-25 Thread Darrick J. Wong
On Mon, Aug 24, 2020 at 03:55:10PM +0100, Matthew Wilcox (Oracle) wrote: > Pass the full length to iomap_zero() and dax_iomap_zero(), and have > them return how many bytes they actually handled. This is preparatory > work for handling THP, although it looks like DAX could actually take > advantage

Re: [PATCH 9/9] iomap: Change calling convention for zeroing

2020-08-25 Thread Dave Chinner
On Tue, Aug 25, 2020 at 01:40:24PM +0100, Matthew Wilcox wrote: > Any objection to leaving this patch as-is with a u64 length? No objection here - I just wanted to make sure that signed/unsigned overflow was not going to be an issue... Cheers, Dave. -- Dave Chinner da...@fromorbit.com

Re: [PATCH 9/9] iomap: Change calling convention for zeroing

2020-08-25 Thread Matthew Wilcox
On Tue, Aug 25, 2020 at 02:27:11PM +1000, Dave Chinner wrote: > On Mon, Aug 24, 2020 at 09:35:59PM -0600, Andreas Dilger wrote: > > On Aug 24, 2020, at 9:26 PM, Matthew Wilcox wrote: > > > > > > On Tue, Aug 25, 2020 at 10:27:35AM +1000, Dave Chinner wrote: > > >>> do { > > >>> -

Re: [PATCH 9/9] iomap: Change calling convention for zeroing

2020-08-24 Thread Dave Chinner
On Mon, Aug 24, 2020 at 09:35:59PM -0600, Andreas Dilger wrote: > On Aug 24, 2020, at 9:26 PM, Matthew Wilcox wrote: > > > > On Tue, Aug 25, 2020 at 10:27:35AM +1000, Dave Chinner wrote: > >>> do { > >>> - unsigned offset, bytes; > >>> - > >>> - offset = offset_in_page(pos); > >

Re: [PATCH 9/9] iomap: Change calling convention for zeroing

2020-08-24 Thread Andreas Dilger
On Aug 24, 2020, at 9:26 PM, Matthew Wilcox wrote: > > On Tue, Aug 25, 2020 at 10:27:35AM +1000, Dave Chinner wrote: >>> do { >>> - unsigned offset, bytes; >>> - >>> - offset = offset_in_page(pos); >>> - bytes = min_t(loff_t, PAGE_SIZE - offset, count); >>> +

Re: [PATCH 9/9] iomap: Change calling convention for zeroing

2020-08-24 Thread Matthew Wilcox
On Tue, Aug 25, 2020 at 10:27:35AM +1000, Dave Chinner wrote: > > do { > > - unsigned offset, bytes; > > - > > - offset = offset_in_page(pos); > > - bytes = min_t(loff_t, PAGE_SIZE - offset, count); > > + loff_t bytes; > > > > if (IS_DAX(ino

Re: [PATCH 9/9] iomap: Change calling convention for zeroing

2020-08-24 Thread Dave Chinner
On Mon, Aug 24, 2020 at 03:55:10PM +0100, Matthew Wilcox (Oracle) wrote: > Pass the full length to iomap_zero() and dax_iomap_zero(), and have > them return how many bytes they actually handled. This is preparatory > work for handling THP, although it looks like DAX could actually take > advantage

[PATCH 9/9] iomap: Change calling convention for zeroing

2020-08-24 Thread Matthew Wilcox (Oracle)
Pass the full length to iomap_zero() and dax_iomap_zero(), and have them return how many bytes they actually handled. This is preparatory work for handling THP, although it looks like DAX could actually take advantage of it if there's a larger contiguous area. Signed-off-by: Matthew Wilcox (Oracl