All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] libgfs2: Zero de_inum.no_addr when deleting dirents
Date: Thu,  5 Jun 2014 11:40:30 +0100	[thread overview]
Message-ID: <1401964830-10636-1-git-send-email-anprice@redhat.com> (raw)

libgfs2 left deleted dirents in leaf blocks which have been split, which
is fine, but it only zeroed the no_formal_ino field, causing gfs2_edit
to display deleted dirents when printing leaf blocks. Zero the no_addr
field too, as the kernel code does.

Signed-off-by: Andrew Price <anprice@redhat.com>
---
 gfs2/libgfs2/fs_ops.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
index fdd4438..015b974 100644
--- a/gfs2/libgfs2/fs_ops.c
+++ b/gfs2/libgfs2/fs_ops.c
@@ -826,6 +826,7 @@ void dirent2_del(struct gfs2_inode *dip, struct gfs2_buffer_head *bh,
 		dip->i_di.di_entries--;
 	}
 	if (!prev) {
+		cur->de_inum.no_addr = 0;
 		cur->de_inum.no_formal_ino = 0;
 		return;
 	}
-- 
1.9.3



                 reply	other threads:[~2014-06-05 10:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1401964830-10636-1-git-send-email-anprice@redhat.com \
    --to=anprice@redhat.com \
    /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 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.