xfs
[Top] [All Lists]

Re: [PATCH 2/2] libxfs: remove ustat() use, factor mount checks into hel

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH 2/2] libxfs: remove ustat() use, factor mount checks into helper function
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 19 Sep 2016 15:53:32 +1000
Cc: Eric Sandeen <sandeen@xxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>, linux-xfs@xxxxxxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <a4e1e08e-1f5f-82b4-7dc2-52ede960aa39@xxxxxxxxxxx>
References: <ed60d5a2-0343-fd49-236e-52f9442291d2@xxxxxxxxxx> <a4e1e08e-1f5f-82b4-7dc2-52ede960aa39@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Sep 08, 2016 at 09:16:11AM -0500, Eric Sandeen wrote:
> ustat() has been deprecated for a very long time, and newer
> architectures (aarch64, for one) have not implemented it.
> If called, it always returns false, so we can no longer use
> it to determine a device's mounted status.
> 
> We already have another mechanism for determining the mounted
> status of a device in platform_check_iswritable; it iterates
> over getmntent looking for the device, and checks its mount
> options.  We can do the same thing to check for a simple mount,
> and not caring about the "ro" mount option.
> 
> Because the loop is essentially the same, factor it into a
> helper which accepts a VERBOSE flag to print info if the device
> is found in the checked-for state, and a WRITABLE flag which
> only checks specifically for a mounted and /writable/ device.
> 
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> ---
> 
> Dave, up to you if you want to take all this in lieu of the
> fixed-up patch from Felix, or if you'd like me to rebase this
> once you have merged that patch.  Happy to do that if you'd like -
> now that I think about it, that may be the cleaner progression
> of changes.

Rebase, please, as it does not apply to the current tree.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>