Re: [PATCH] fs: add the FIGETFROZEN ioctl call

From: Dave Chinner
Date: Fri Apr 22 2016 - 19:14:39 EST


On Fri, Apr 22, 2016 at 11:53:48PM +0200, Florian Margaine wrote:
> On Tue, Apr 19, 2016 at 1:06 AM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
> >> A way to query freeze state might be nice, I think, but yeah, it's
> >> racy, so you can't depend on it - but it might be useful in the "huh,
> >> IO is failing, what's going on? Oh, it's frozen, ok" scenario...
> >
> > So maybe we should just add the frozen state to /proc/self/mountinfo
> > or something similar, then people who think it matters can shoot
> > themselves in the foot all they want without us needing to care
> > about it.
>
> Sorry if it's a basic question, but what is the difference between
> /proc/self/mountinfo and providing an ioctl call?

Simply this:

$ grep xfs /proc/self/mountinfo
22 0 9:0 / / rw,relatime - xfs /dev/block/9:0 rw,attr2,inode64,sunit=1024,swidth=2048,noquota

i.e. no need for a custom binary to query state in diagnostic
situations where it might matter. And it shows up in things like SOS
reports that distro's gather when users report issues.

Cheers,

Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx