Re: [dm-devel] [PATCH 3/5] iomap: simplify iomap_init() with PAGE_SECTORS

2023-04-24 Thread Christoph Hellwig
On Sat, Apr 22, 2023 at 08:34:20AM +1000, Dave Chinner wrote: > > > > - return bioset_init(_ioend_bioset, 4 * (PAGE_SIZE / SECTOR_SIZE), > > + return bioset_init(_ioend_bioset, 4 * PAGE_SECTORS, > > Yes, please. > > > The shift just seemed optimal if we're just going to change it. > >

Re: [dm-devel] [PATCH 3/5] iomap: simplify iomap_init() with PAGE_SECTORS

2023-04-21 Thread Jens Axboe
On 4/21/23 4:30?PM, Luis Chamberlain wrote: > On Fri, Apr 21, 2023 at 04:24:57PM -0600, Jens Axboe wrote: >> On 4/21/23 4:02?PM, Luis Chamberlain wrote: >>> On Fri, Apr 21, 2023 at 09:14:00PM +0100, Matthew Wilcox wrote: On Fri, Apr 21, 2023 at 12:58:05PM -0700, Luis Chamberlain wrote: >

Re: [dm-devel] [PATCH 3/5] iomap: simplify iomap_init() with PAGE_SECTORS

2023-04-21 Thread Dave Chinner
On Fri, Apr 21, 2023 at 03:02:30PM -0700, Luis Chamberlain wrote: > On Fri, Apr 21, 2023 at 09:14:00PM +0100, Matthew Wilcox wrote: > > On Fri, Apr 21, 2023 at 12:58:05PM -0700, Luis Chamberlain wrote: > > > Just use the PAGE_SECTORS generic define. This produces no functional > > > changes. While

Re: [dm-devel] [PATCH 3/5] iomap: simplify iomap_init() with PAGE_SECTORS

2023-04-21 Thread Luis Chamberlain
On Fri, Apr 21, 2023 at 04:24:57PM -0600, Jens Axboe wrote: > On 4/21/23 4:02 PM, Luis Chamberlain wrote: > > On Fri, Apr 21, 2023 at 09:14:00PM +0100, Matthew Wilcox wrote: > >> On Fri, Apr 21, 2023 at 12:58:05PM -0700, Luis Chamberlain wrote: > >>> Just use the PAGE_SECTORS generic define. This

Re: [dm-devel] [PATCH 3/5] iomap: simplify iomap_init() with PAGE_SECTORS

2023-04-21 Thread Jens Axboe
On 4/21/23 4:02 PM, Luis Chamberlain wrote: > On Fri, Apr 21, 2023 at 09:14:00PM +0100, Matthew Wilcox wrote: >> On Fri, Apr 21, 2023 at 12:58:05PM -0700, Luis Chamberlain wrote: >>> Just use the PAGE_SECTORS generic define. This produces no functional >>> changes. While at it use left shift to

Re: [dm-devel] [PATCH 3/5] iomap: simplify iomap_init() with PAGE_SECTORS

2023-04-21 Thread Luis Chamberlain
On Fri, Apr 21, 2023 at 09:14:00PM +0100, Matthew Wilcox wrote: > On Fri, Apr 21, 2023 at 12:58:05PM -0700, Luis Chamberlain wrote: > > Just use the PAGE_SECTORS generic define. This produces no functional > > changes. While at it use left shift to simplify this even further. > > How is FOO << 2

Re: [dm-devel] [PATCH 3/5] iomap: simplify iomap_init() with PAGE_SECTORS

2023-04-21 Thread Matthew Wilcox
On Fri, Apr 21, 2023 at 12:58:05PM -0700, Luis Chamberlain wrote: > Just use the PAGE_SECTORS generic define. This produces no functional > changes. While at it use left shift to simplify this even further. How is FOO << 2 simpler than FOO * 4? > - return bioset_init(_ioend_bioset, 4 *