Re: [PATCH RESEND 3/4] scsi: sg: use queue_logical_sector_size() in max_sectors_bytes()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The resend is done to add linux-api@xxxxxxxxxxxxxxx to the CC list. I
also removed some CC because the email addresses no longer exist (and
accidentally made a typo to one that still does, hence the second
resend). I don't know if that counts as a change.

I didn't think 3/4 and 4/4 requires further explanation, as I thought
they are self-explanatory enough (logical sector size has never been,
or at least is no longer, necessarily 512). I can add that to the
commit message.

P.S. Even I myself isn't exactly sure what/which clamping should be
used in max_sectors_bytes(). The reason I picked USHRT_MAX is that
BLKSECTGET in sg should work identically to its equivalence in the
block layer, regardless of whether that is
technically/programmatically necessary. So I decided to use the same
clamping in max_sector_bytes(). But it seems fine/correct to clamp
(max_sectors * logical_sector_size) to INT_MAX instead
(https://github.com/torvalds/linux/blob/v5.9-rc3/block/blk-mq.c#L3211).
(On the other hand, in that case it could end up being inconsistent to
what BLKSECTGET + BLKSSZGET reports). Perhaps I should add my
uncertainty / the alternative to the commit message.

Regards,
Tom

On Sun, 6 Sep 2020 at 14:26, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Sun, Sep 06, 2020 at 09:27:15AM +0800, Tom Yan wrote:
> > Signed-off-by: Tom Yan <tom.ty89@xxxxxxxxx>
> > ---
> >  drivers/scsi/sg.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
>
> I know I don't take patches without any changelog text at all, but maybe
> the scsi maintainers are more leniant.
>
> You should write changelogs that explain _why_ you are doing what you
> are doing, you just say what you did, with no reasoning at all.
>
> Same for another patch in this series.
>
> thanks,
>
> greg k-h



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux