[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1709498.1700251890@warthog.procyon.org.uk>
Date: Fri, 17 Nov 2023 20:11:30 +0000
From: David Howells <dhowells@...hat.com>
To: Jeff Layton <jlayton@...nel.org>
Cc: dhowells@...hat.com, Steve French <smfrench@...il.com>,
Matthew Wilcox <willy@...radead.org>,
Marc Dionne <marc.dionne@...istor.com>,
Paulo Alcantara <pc@...guebit.com>,
Shyam Prasad N <sprasad@...rosoft.com>, Tom Talpey <tom@...pey.com>,
Dominique Martinet <asmadeus@...ewreck.org>,
Ilya Dryomov <idryomov@...il.com>,
Christian Brauner <christian@...uner.io>,
linux-afs@...ts.infradead.org, linux-cifs@...r.kernel.org,
linux-nfs@...r.kernel.org, ceph-devel@...r.kernel.org,
v9fs@...ts.linux.dev, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-cachefs@...hat.com
Subject: Re: [RFC PATCH 12/53] netfs: Provide tools to create a buffer in an xarray
Jeff Layton <jlayton@...nel.org> wrote:
> Some kerneldoc comments on these new helpers would be nice. I assume
> that "index" and "to" are "start" and "end" for this, but it'd be nice
> to make that explicit.
These are internal to netfs not API functions, so they shouldn't appear in the
API docs. That's why the declaration is in internal.h, not netfs.h.
That said, I could describe them better.
> > + ret = netfs_add_folios_to_buffer(buffer, mapping, want_index,
> > + have_index - 1, gfp_mask);
> > + if (ret < 0)
> > + return ret;
> > + have_folios += have_index - want_index;
> > +
> > + ret = netfs_add_folios_to_buffer(buffer, mapping,
> > + have_index + have_folios,
> > + want_index + want_folios - 1,
> > + gfp_mask);
>
> I don't get it. Why are you calling netfs_add_folios_to_buffer twice
> here? Why not just make one call? Either way, a comment here explaining
> that would also be nice.
The ranges aren't contiguous. They bracket the folios spliced from the
mapping. That being said, I seem to have lost a bit of maths somewhere.
Further, I'm not now using netfs_add_folios_to_buffer(), so I'll remove it.
David
Powered by blists - more mailing lists