From: Valerie Aurora <vaurora@redhat.com>
To: Erez Zadok <ezk@cs.sunysb.edu>
Cc: Scott James Remnant <scott@canonical.com>,
Felix Fietkau <nbd@openwrt.org>,
"J. R. Okajima" <hooanon05@yahoo.co.jp>,
Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>,
linux-fsdevel@vger.kernel.org,
Sandu Popa Marius <sandupopamarius@gmail.com>,
linux-mtd@lists.infradead.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andy Whitcroft <apw@canonical.com>,
Vladimir Dronnikov <dronnikov@gmail.com>,
Jan Blunck <jblunck@suse.de>,
David Woodhouse <dwmw2@infradead.org>,
Jan Rekorajski <baggins@sith.mimuw.edu.pl>
Subject: Re: [PATCH 16/41] whiteout: jffs2 whiteout support
Date: Tue, 26 Jan 2010 14:52:09 -0500 [thread overview]
Message-ID: <20100126195208.GC32353@shell> (raw)
In-Reply-To: <200911300751.nAU7p53e022740@agora.fsl.cs.sunysb.edu>
On Mon, Nov 30, 2009 at 02:51:05AM -0500, Erez Zadok wrote:
> In message <1256152779-10054-17-git-send-email-vaurora@redhat.com>, Valerie Aurora writes:
> > From: Felix Fietkau <nbd@openwrt.org>
> >
> > Add support for whiteout dentries to jffs2.
> >
> > Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> > Signed-off-by: Valerie Aurora <vaurora@redhat.com>
> > Cc: David Woodhouse <dwmw2@infradead.org>
> > Cc: linux-mtd@lists.infradead.org
> > ---
> > fs/jffs2/dir.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++-
> > fs/jffs2/fs.c | 4 ++
> > fs/jffs2/super.c | 2 +-
> > include/linux/jffs2.h | 2 +
> > 4 files changed, 82 insertions(+), 3 deletions(-)
> >
> > diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
> > index 6f60cc9..46a2e1b 100644
> > --- a/fs/jffs2/dir.c
> > +++ b/fs/jffs2/dir.c
> > @@ -34,6 +34,8 @@ static int jffs2_mknod (struct inode *,struct dentry *,int,dev_t);
> > static int jffs2_rename (struct inode *, struct dentry *,
> > struct inode *, struct dentry *);
> >
> > +static int jffs2_whiteout (struct inode *, struct dentry *, struct dentry *);
> > +
> > const struct file_operations jffs2_dir_operations =
> > {
> > .read = generic_read_dir,
> > @@ -55,6 +57,7 @@ const struct inode_operations jffs2_dir_inode_operations =
> > .rmdir = jffs2_rmdir,
> > .mknod = jffs2_mknod,
> > .rename = jffs2_rename,
> > + .whiteout = jffs2_whiteout,
> > .permission = jffs2_permission,
> > .setattr = jffs2_setattr,
> > .setxattr = jffs2_setxattr,
> > @@ -98,8 +101,18 @@ static struct dentry *jffs2_lookup(struct inode *dir_i, struct dentry *target,
> > fd = fd_list;
> > }
> > }
> > - if (fd)
> > - ino = fd->ino;
> > + if (fd) {
> > + spin_lock(&target->d_lock);
> > + switch(fd->type) {
> > + case DT_WHT:
> > + target->d_flags |= DCACHE_WHITEOUT;
> > + break;
> > + default:
> > + ino = fd->ino;
> > + break;
> > + }
> > + spin_unlock(&target->d_lock);
> > + }
>
> The switch statement above should be simplified into this:
>
> if (fd->type == DT_WHT)
> target->d_flags |= DCACHE_WHITEOUT;
> else
> ino = fd->ino;
This is because later we add a third case for fallthrus, at which
point a switch statement is easier to read. But it is confusing and
distracting by itself in this patch, so I changed it as you suggested.
> > + /* If it's a directory, then check whether it is really empty
> > + */
>
> Format above comment on one line.
Fixxed, thanks.
-VAL
prev parent reply other threads:[~2010-01-26 19:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1256152779-10054-1-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-2-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-3-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-4-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-5-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-6-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-7-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-8-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-9-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-10-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-11-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-12-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-13-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-14-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-15-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-16-git-send-email-vaurora@redhat.com>
2009-10-21 19:19 ` [PATCH 16/41] whiteout: jffs2 whiteout support Valerie Aurora
[not found] ` <1256152779-10054-18-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-19-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-20-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-21-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-22-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-23-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-24-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-25-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-26-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-27-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-28-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-29-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-30-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-31-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-32-git-send-email-vaurora@redhat.com>
[not found] ` <1256152779-10054-33-git-send-email-vaurora@redhat.com>
2009-10-21 19:19 ` [PATCH 33/41] fallthru: jffs2 fallthru support Valerie Aurora
2009-12-01 4:17 ` Erez Zadok
2009-10-21 22:50 ` [PATCH 16/41] whiteout: jffs2 whiteout support David Woodhouse
2009-10-27 2:21 ` Valerie Aurora
2009-11-30 7:51 ` Erez Zadok
2010-01-26 19:52 ` Valerie Aurora [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=20100126195208.GC32353@shell \
--to=vaurora@redhat.com \
--cc=apw@canonical.com \
--cc=arnd@arndb.de \
--cc=baggins@sith.mimuw.edu.pl \
--cc=dronnikov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=ezk@cs.sunysb.edu \
--cc=hch@infradead.org \
--cc=hooanon05@yahoo.co.jp \
--cc=jblunck@suse.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=nbd@openwrt.org \
--cc=sandupopamarius@gmail.com \
--cc=scott@canonical.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