From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Fri, 18 Dec 2015 13:02:26 -0600 Subject: [Cluster-devel] [PATCH 0/4] patches related to file unlink->delete->new Message-ID: <1450465350-10060-1-git-send-email-rpeterso@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Back on October 22, I posted a set of fourteen patches related to the transition of inodes from unlinked to free. Since then, I've found and fixed several problems with the patches. I've also treated several of those patches as separate problems. What remains is this set of four patches. 1. The first patch prevents collisions between locks being used to delete inodes and the same glock being used to create a new inode. This prevents all kinds of bad problems, most of which have to do with glock reference count problems. 2. The second patch makes it so that we no longer filter out I_FREEING inodes anymore. As I stated in an email from 10 December, if we tell the delete code the inode does not exist, it will quit trying to delete it, and the dinode on disk will be stuck in "unlinked". With this patch, inodes that are in I_FREEING will blocked until vfs (and GFS2) are done with them. Then a new inode is created and used for the transition from unlinked to free. 3. The third patch simply removes a parameter from gfs2_inode_lookup which is no longer needed, since it is no longer referenced. 4. The final patch changes the delete code so that it uses the normal inode lookup code to identify inodes that need to be transitioned from unlinked to free. This patch adds a new parameter "for_del" to function gfs2_inode_lookup() which instructs the code to verify that the block is unlinked before proceeding. This makes sure the glock work is all safely done with the correct lock ordering. Signed-off-by: Bob Peterson Bob Peterson (4): GFS2: Prevent delete work from occurring on glocks used for create GFS2: Don't filter out I_FREEING inodes anymore GFS2: Eliminate parameter non_block on gfs2_inode_lookup GFS2: Make deletes use regular inode_lookup with special code path fs/gfs2/export.c | 2 +- fs/gfs2/glock.c | 14 ++++---- fs/gfs2/incore.h | 1 + fs/gfs2/inode.c | 99 ++++++++++++++++++++++---------------------------------- fs/gfs2/inode.h | 4 +-- 5 files changed, 49 insertions(+), 71 deletions(-) -- 2.5.0