linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@redhat.com>
To: Miklos Szeredi <mszeredi@redhat.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org,
	Andreas Gruenbacher <agruenba@redhat.com>,
	Steven Whitehouse <swhiteho@redhat.com>
Subject: Re: [PATCH 0/7] Allow lock dropping before waiting on inodes being freed
Date: Tue, 31 May 2016 12:45:46 -0400 (EDT)	[thread overview]
Message-ID: <681339030.12880459.1464713146488.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1463161349-547-1-git-send-email-agruenba@redhat.com>

----- Original Message -----
| This patch set my Bob and me avoids a deadlock in gfs2 when an inode is being
| freed: normally, when find_inode finds an inode in I_FREEING or I_WILL_FREE
| state, it waits for the inode to go away before returning
| (__wait_on_freeing_inode).  Freeing an inode on gfs2 requires taking the
| inode's glock.  However, in gfs2_lookup_by_inum, we need to be holding the
| inode glock while doing lookups, so we can deadlock with processes
| concurrently
| freeing inodes.
| 
| This patch set allows gfs2_lookup_by_inum to drop the inode glock before
| waiting for inodes to go away.  We could try non-blocking lookups and wait
| for
| an arbitrary amount of time before retrying the lookup instead as well, but
| waiting for the actual event (i.e., the inode being freed to likely have
| disappeared) makes more sense.
| 
| Thanks,
| Andreas
| 
| Andreas Gruenbacher (5):
|   GFS2: Remove superfluous assignment
|   GFS2: No need for non-blocking gfs2_ilookup in delete_work_func
|   vfs: Introduce prepare_wait_on_freeing_inode
|   GFS2: Use non-blocking wait in gfs2_iget
|   GFS2: Prevent deadlock in gfs2_lookup_by_inum
| 
| Bob Peterson (2):
|   Revert "GFS2: Eliminate parameter non_block on gfs2_inode_lookup"
|   Revert "GFS2: Don't filter out I_FREEING inodes anymore"
| 
|  fs/gfs2/dir.c        |   2 +-
|  fs/gfs2/glock.c      |   4 +-
|  fs/gfs2/inode.c      | 109
|  ++++++++++++++++++++++++++++++++++++++++++++++-----
|  fs/gfs2/inode.h      |   8 +++-
|  fs/gfs2/ops_fstype.c |   2 +-
|  fs/inode.c           |  18 +++++++--
|  include/linux/fs.h   |   1 +
|  include/linux/wait.h |  21 +++++++---
|  8 files changed, 142 insertions(+), 23 deletions(-)
| 
| --
| 2.5.5

Hi Miklos and Al,

Did you two guys see the vfs-related changes contained in the patch set
sent by Andreas on 13 May, and resent by me on 24 May? We have not received
any comments about the patches, but since they affect VFS, I wanted to be
sure you two looked them over before I pushed them to the gfs2 for-next tree.
I just don't want to be accused of trying to slip this in under the radar or
you guys being taken by surprise.

Regards,

Bob Peterson
Red Hat File Systems

      parent reply	other threads:[~2016-05-31 16:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13 17:42 [PATCH 0/7] Allow lock dropping before waiting on inodes being freed Andreas Gruenbacher
2016-05-13 17:42 ` [PATCH 1/7] Revert "GFS2: Eliminate parameter non_block on gfs2_inode_lookup" Andreas Gruenbacher
2016-05-13 17:42 ` [PATCH 2/7] Revert "GFS2: Don't filter out I_FREEING inodes anymore" Andreas Gruenbacher
2016-05-13 17:42 ` [PATCH 3/7] GFS2: Remove superfluous assignment Andreas Gruenbacher
2016-05-13 17:42 ` [PATCH 4/7] GFS2: No need for non-blocking gfs2_ilookup in delete_work_func Andreas Gruenbacher
2016-05-13 17:42 ` [PATCH 5/7] vfs: Introduce prepare_wait_on_freeing_inode Andreas Gruenbacher
2016-05-13 17:42 ` [PATCH 6/7] GFS2: Use non-blocking wait in gfs2_iget Andreas Gruenbacher
2016-05-13 17:42 ` [PATCH 7/7] GFS2: Prevent deadlock in gfs2_lookup_by_inum Andreas Gruenbacher
2016-05-16 12:14 ` [PATCH 0/7] Allow lock dropping before waiting on inodes being freed Andreas Gruenbacher
2016-05-31 16:45 ` Bob Peterson [this message]

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=681339030.12880459.1464713146488.JavaMail.zimbra@redhat.com \
    --to=rpeterso@redhat.com \
    --cc=agruenba@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    --cc=swhiteho@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).