From: Theodore Tso <tytso@mit.edu>
To: Akira Fujita <a-fujita@rs.jp.nec.com>
Cc: Andreas Dilger <adilger@sun.com>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH]ext4: Add checks whether two inodes are different
Date: Tue, 29 Sep 2009 10:49:14 -0400 [thread overview]
Message-ID: <20090929144914.GD24383@mit.edu> (raw)
In-Reply-To: <4AC198AF.1070600@rs.jp.nec.com>
On Tue, Sep 29, 2009 at 02:18:39PM +0900, Akira Fujita wrote:
> I thought the argument check (orig and donor inodes are different)
> should be done in mext_check_arguments()
Sometimes separating things into multiple functions can actually make
things harder to understand, since it means you have to jump all over
the file to follow what a particular function is doing. Sometimes
having a function which is nested deeply in a loop can be made easier
to understand by separating it out into a separate function which is
called once.
Part of the reason why mext_check_arguments() is so huge is because of
all of the ext4_debug() statements. It's not clear to me they really
all need to be there. I'd also use EBUSY if the file is a swap file,
so it's easier for the userspace code to understand what is going on
in that case. For the other many cases where EINVAL is returned,
hopefully that's obvious enough for userspace to figure out without
having to resort to looking to the system debug logs.
- Ted
prev parent reply other threads:[~2009-09-29 14:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-25 8:31 [PATCH]ext4: Add checks whether two inodes are different Akira Fujita
2009-09-25 10:34 ` Andreas Dilger
2009-09-28 20:00 ` Theodore Tso
2009-09-29 5:18 ` Akira Fujita
2009-09-29 14:49 ` Theodore Tso [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=20090929144914.GD24383@mit.edu \
--to=tytso@mit.edu \
--cc=a-fujita@rs.jp.nec.com \
--cc=adilger@sun.com \
--cc=linux-ext4@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: 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;
as well as URLs for NNTP newsgroup(s).