[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5d7e25798d679ea4ba070950cdb5a14f9818eff.camel@amazon.com>
Date: Sat, 4 Jan 2020 04:44:01 +0000
From: "Singh, Balbir" <sblbir@...zon.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Chaitanya.Kulkarni@....com" <Chaitanya.Kulkarni@....com>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>
CC: "hch@....de" <hch@....de>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"mst@...hat.com" <mst@...hat.com>,
"axboe@...nel.dk" <axboe@...nel.dk>,
"Sangaraju, Someswarudu" <ssomesh@...zon.com>
Subject: Re: [resend v1 1/5] block/genhd: Notify udev about capacity change
On Fri, 2020-01-03 at 06:16 +0000, Chaitanya Kulkarni wrote:
> On 01/01/2020 11:53 PM, Balbir Singh wrote:
> > Allow block/genhd to notify user space (via udev) about disk size changes
> > using a new helper disk_set_capacity(), which is a wrapper on top
> > of set_capacity(). disk_set_capacity() will only notify via udev if
> > the current capacity or the target capacity is not zero.
> >
> > Suggested-by: Christoph Hellwig<hch@....de>
> > Signed-off-by: Someswarudu Sangaraju<ssomesh@...zon.com>
> > Signed-off-by: Balbir Singh<sblbir@...zon.com>
> > ---
>
> Since disk_set_capacity(() is on the same line as set_capacity()
> we should follow the same convention, which is :-
>
> 1. Avoid exporting symbol.
> 2. Mark new function in-line.
>
> Unless there is a very specific reason for breaking the pattern.
>
I don't see the benefit of marking it as inline. I expect this code to be
potentially expanded to provide callbacks into file system code for expansion
(something you brought up), marking it as inline might be a limitation.
I'd rather not clutter the headers with this code, but I am open to what the
maintainers think as well.
Balbir Singh.
Powered by blists - more mailing lists