linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yang Joseph <joseph.yang@xtaotech.com>
To: linux-xfs@vger.kernel.org
Cc: sandeen@sandeen.net, david@fromorbit.com, sandeen@redhat.com,
	nathans@debian.org, rtlinux@163.com
Subject: Re: xfs_repair: add '-F' option to ignore writable mount checking
Date: Fri, 2 Mar 2018 14:23:09 +0800	[thread overview]
Message-ID: <5A98EDCD.9060005@xtaotech.com> (raw)
In-Reply-To: <5A9765FD.1090907@xtaotech.com>


Hello Eric Sandeen and Dave Chinner,

Could you kindly help me to review this patch? This time, the xfs_repair 
block problem is fixed,
and xfs_repair/xfs_copy's behaviors are the same as before.

# mount | grep fuse
ceph-fuse on /mnt/registry type fuse.ceph-fuse 
(rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)

stat('ceph-fuse') will return error, and the mountpoint scanning loop 
will continue, other than blocked on stat("/mnt/registry").

thx,

Yang Honggang

On 03/01/2018 10:31 AM, Yang Joseph wrote:
>
> hello,
>
> My last reply is rejected, so I resend this email.
>
> A new suggestion:
>
> From: Yang Honggang <joseph.yang@xtaotech.com>
>
> stat(/path/to/device) instead of stat(mountpoint) to prevent
> platform_check_mount() from hanging on stat() systemcall
> when a dead fuse mountpoint is encountered. Because this
> kind of mountpoint has no local device, only 'ceph-fuse',
> stat('ceph-fuse') will return error, and the while loop will
> continue.
>
> Signed-off-by: Yang Honggang <joseph.yang@xtaotech.com>
> ---
>  libxfs/linux.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libxfs/linux.c b/libxfs/linux.c
> index 0bace3e..d415c33 100644
> --- a/libxfs/linux.c
> +++ b/libxfs/linux.c
> @@ -78,9 +78,9 @@ platform_check_mount(char *name, char *block, struct 
> stat *s, int flags)
>          return 1;
>      }
>      while ((mnt = getmntent(f)) != NULL) {
> -        if (stat(mnt->mnt_dir, &mst) < 0)
> +        if (stat(mnt->mnt_fsname, &mst) < 0)
>              continue;
> -        if (mst.st_dev != s->st_rdev)
> +        if (mst.st_rdev != s->st_rdev)
>              continue;
>          /* Found our device, is RO OK? */
>          if ((flags & CHECK_MOUNT_WRITABLE) && hasmntopt(mnt, MNTOPT_RO))


  reply	other threads:[~2018-03-02  6:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5A97638A.9050509@xtaotech.com>
2018-03-01  2:31 ` Re:Re: xfs_repair: add '-F' option to ignore writable mount checking Yang Joseph
2018-03-02  6:23   ` Yang Joseph [this message]
2018-02-24 11:23 Yang Joseph
2018-02-24 17:56 ` Eric Sandeen
2018-02-24 22:04   ` Dave Chinner
2018-02-24 22:08     ` Eric Sandeen
2018-02-26  2:59     ` Yang Joseph
2018-02-26 12:02       ` Carlos Maiolino
2018-02-26 12:19       ` Brian Foster
2018-02-27 10:44     ` Yang Joseph
2018-02-27 10:57       ` Carlos Maiolino
2018-02-27 14:47       ` Eric Sandeen
2018-02-28  3:31         ` Yang Joseph
2018-02-28  3:34         ` Yang Joseph

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A98EDCD.9060005@xtaotech.com \
    --to=joseph.yang@xtaotech.com \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=nathans@debian.org \
    --cc=rtlinux@163.com \
    --cc=sandeen@redhat.com \
    --cc=sandeen@sandeen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).