From: Bob Peterson <rpeterso@redhat.com> To: <linux-fsdevel@vger.kernel.org> Cc: cluster-devel@redhat.com Subject: [PATCH 3/4] gfs2: Large-filesystem fix for 32-bit systems Date: Mon, 20 Jun 2016 10:55:32 -0500 [thread overview] Message-ID: <1466438133-10564-4-git-send-email-rpeterso@redhat.com> (raw) In-Reply-To: <1466438133-10564-1-git-send-email-rpeterso@redhat.com> From: Andreas Gruenbacher <agruenba@redhat.com> Commit ff34245d switched from iget5_locked to iget_locked among other things, but iget_locked doesn't work for filesystems larger than 2^32 blocks on 32-bit systems. Switch back to iget5_locked. Filesystems larger than 2^32 blocks are unrealistic to work well on 32-bit systems, so this is mostly a code cleanliness fix. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com> --- fs/gfs2/inode.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index ebff26e..481b649 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -37,19 +37,34 @@ #include "super.h" #include "glops.h" +static int iget_test(struct inode *inode, void *opaque) +{ + u64 no_addr = *(u64 *)opaque; + + return GFS2_I(inode)->i_no_addr == no_addr; +} + +static int iget_set(struct inode *inode, void *opaque) +{ + u64 no_addr = *(u64 *)opaque; + + GFS2_I(inode)->i_no_addr = no_addr; + inode->i_ino = no_addr; + return 0; +} + static struct inode *gfs2_iget(struct super_block *sb, u64 no_addr) { struct inode *inode; repeat: - inode = iget_locked(sb, no_addr); + inode = iget5_locked(sb, no_addr, iget_test, iget_set, &no_addr); if (!inode) return inode; if (is_bad_inode(inode)) { iput(inode); goto repeat; } - GFS2_I(inode)->i_no_addr = no_addr; return inode; } -- 2.5.5
WARNING: multiple messages have this Message-ID (diff)
From: Bob Peterson <rpeterso@redhat.com> To: cluster-devel.redhat.com Subject: [Cluster-devel] [PATCH 3/4] gfs2: Large-filesystem fix for 32-bit systems Date: Mon, 20 Jun 2016 10:55:32 -0500 [thread overview] Message-ID: <1466438133-10564-4-git-send-email-rpeterso@redhat.com> (raw) In-Reply-To: <1466438133-10564-1-git-send-email-rpeterso@redhat.com> From: Andreas Gruenbacher <agruenba@redhat.com> Commit ff34245d switched from iget5_locked to iget_locked among other things, but iget_locked doesn't work for filesystems larger than 2^32 blocks on 32-bit systems. Switch back to iget5_locked. Filesystems larger than 2^32 blocks are unrealistic to work well on 32-bit systems, so this is mostly a code cleanliness fix. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com> --- fs/gfs2/inode.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index ebff26e..481b649 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -37,19 +37,34 @@ #include "super.h" #include "glops.h" +static int iget_test(struct inode *inode, void *opaque) +{ + u64 no_addr = *(u64 *)opaque; + + return GFS2_I(inode)->i_no_addr == no_addr; +} + +static int iget_set(struct inode *inode, void *opaque) +{ + u64 no_addr = *(u64 *)opaque; + + GFS2_I(inode)->i_no_addr = no_addr; + inode->i_ino = no_addr; + return 0; +} + static struct inode *gfs2_iget(struct super_block *sb, u64 no_addr) { struct inode *inode; repeat: - inode = iget_locked(sb, no_addr); + inode = iget5_locked(sb, no_addr, iget_test, iget_set, &no_addr); if (!inode) return inode; if (is_bad_inode(inode)) { iput(inode); goto repeat; } - GFS2_I(inode)->i_no_addr = no_addr; return inode; } -- 2.5.5
next prev parent reply other threads:[~2016-06-20 16:03 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-06-20 15:55 [PATCH 0/4] Patches for gfs2_lookup_by_inum deadlock Bob Peterson 2016-06-20 15:55 ` [Cluster-devel] " Bob Peterson 2016-06-20 15:55 ` [PATCH 1/4] gfs2: Fix gfs2_lookup_by_inum lock inversion Bob Peterson 2016-06-20 15:55 ` [Cluster-devel] " Bob Peterson 2016-06-20 15:55 ` [PATCH 2/4] gfs2: Get rid of gfs2_ilookup Bob Peterson 2016-06-20 15:55 ` [Cluster-devel] " Bob Peterson 2016-06-20 15:55 ` Bob Peterson [this message] 2016-06-20 15:55 ` [Cluster-devel] [PATCH 3/4] gfs2: Large-filesystem fix for 32-bit systems Bob Peterson 2016-06-20 15:55 ` [PATCH 4/4] gfs2: Lock holder cleanup Bob Peterson 2016-06-20 15:55 ` [Cluster-devel] " Bob Peterson 2016-06-24 11:04 ` [Cluster-devel] [PATCH 0/4] Patches for gfs2_lookup_by_inum deadlock Steven Whitehouse 2016-06-24 11:04 ` Steven Whitehouse
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=1466438133-10564-4-git-send-email-rpeterso@redhat.com \ --to=rpeterso@redhat.com \ --cc=cluster-devel@redhat.com \ --cc=linux-fsdevel@vger.kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.