Am 29.04.2025 um 23:09 hat Eric Blake geschrieben:
> On Tue, Apr 29, 2025 at 05:56:54PM +0200, Kevin Wolf wrote:
> > Block devices that don't support discard have a discard_granularity of
> > 0. Currently, this results in a division by zero when we try to make
> > sure that it's a multiple of request_alignment. Only try to update
> > bs->bl.pdiscard_alignment when we got a non-zero discard_granularity
> > from sysfs.
> > 
> > Fixes: f605796aae4 ('file-posix: probe discard alignment on Linux block 
> > devices')
> > Signed-off-by: Kevin Wolf <kw...@redhat.com>
> > ---
> >  block/file-posix.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Eric Blake <ebl...@redhat.com>
> 
> (Coverity has proven its worth, yet again)

Oh, interesting, you're right, Coverity flagged this, too. I got its
notification a few hours after sending the patch. :-)

I actually ran into this myself with an iscsi disk I used for testing
the multipath failover stuff.

Kevin


Reply via email to