All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [GFS2 PATCH 0/3] Fix inode transition from unlinked to free
@ 2016-04-27 15:35 Bob Peterson
  2016-04-27 15:35 ` [Cluster-devel] [GFS2 PATCH 1/3] Revert "GFS2: Eliminate parameter non_block on gfs2_inode_lookup" Bob Peterson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bob Peterson @ 2016-04-27 15:35 UTC (permalink / raw)
  To: cluster-devel.redhat.com

This is a set of three patches designed to fix the severely broken
transition from unlinked to free dinodes. Previously, I had posted
patches to ditch the code that filtered out I_FREEing inodes, but
now I'm adding it back in and leveraging it for the new patch. The
new patch basically adds retry loops to the glock delete_work_func,
so that when an inode is not found in memory, the operation is retried,
but only if it's in an I_FREEing state. So the delete_work_func now
becomes: (1) Try to find the inode in inode cache (gfs2_ilookup).
If the inode is in I_FREEING, we sleep and try again later, for a
certain retry period. After that, if it's still not found in cache
(whether not in cache or any other error) it goes on to call the
gfs2_lookup_by_inum for a certain number of retries. Again, if the
inode in still I_FREEing, we sleep and retry the operation.
Since there's so much common logic, I decided to combine the two
lookup functions (gfs2_ilookup and gfs2_iget) into a common function,
inode_lookup_common. I also had to add the logic for the lookup to
return -EAGAIN in the cases we need.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
Bob Peterson (3):
  Revert "GFS2: Eliminate parameter non_block on gfs2_inode_lookup"
  Revert "GFS2: Don't filter out I_FREEING inodes anymore"
  GFS2: Add retry loop to delete_work_func

 fs/gfs2/dir.c        |  2 +-
 fs/gfs2/export.c     |  2 +-
 fs/gfs2/glock.c      | 29 ++++++++++++++------
 fs/gfs2/inode.c      | 77 ++++++++++++++++++++++++++++++++++++++++++++++++----
 fs/gfs2/inode.h      |  5 ++--
 fs/gfs2/ops_fstype.c |  2 +-
 6 files changed, 99 insertions(+), 18 deletions(-)

-- 
2.5.5



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-28 14:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-27 15:35 [Cluster-devel] [GFS2 PATCH 0/3] Fix inode transition from unlinked to free Bob Peterson
2016-04-27 15:35 ` [Cluster-devel] [GFS2 PATCH 1/3] Revert "GFS2: Eliminate parameter non_block on gfs2_inode_lookup" Bob Peterson
2016-04-27 15:35 ` [Cluster-devel] [GFS2 PATCH 2/3] Revert "GFS2: Don't filter out I_FREEING inodes anymore" Bob Peterson
2016-04-27 15:35 ` [Cluster-devel] [GFS2 PATCH 3/3] GFS2: Add retry loop to delete_work_func Bob Peterson
2016-04-27 17:10   ` [Cluster-devel] [GFS2 PATCH 3/3 v2] " Bob Peterson
2016-04-28  9:44     ` Steven Whitehouse
2016-04-28 14:16       ` [Cluster-devel] [GFS2 PATCH 3/3 v3] " Bob Peterson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.