linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joel Becker <jlbec@evilplan.org>
To: Ted Ts'o <tytso@mit.edu>
Cc: Manish Katiyar <mkatiyar@gmail.com>, Jan Kara <jack@suse.cz>,
	ext4 <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 1/3] jbd2 : Make jbd2 transaction handle allocation to return errors and handle them gracefully.
Date: Sat, 22 Jan 2011 22:29:01 -0800	[thread overview]
Message-ID: <20110123062900.GA7436@noexit> (raw)
In-Reply-To: <20110123054049.GC3237@thunk.org>

On Sun, Jan 23, 2011 at 12:40:49AM -0500, Ted Ts'o wrote:
> On Sat, Jan 22, 2011 at 07:32:44PM -0800, Manish Katiyar wrote:
> >  Hi Jan,
> > 
> > This is the follow up from https://lkml.org/lkml/2011/1/17/154
> > Following patches make jbd2 to use GFP_KERNEL for transaction
> > allocation if the caller can handle the errors. Following is the list
> > of functions that I updated to pass the new flag. Also below is the
> > list of functions which still have the old behavior and pass the old
> > flags (either because they can't deal with errors, or I wasn't too
> > sure so I did conservatively). Appreciate your feedback. The other
> > callers of jbd2_journal_start() are from ocfs2, they still pass the
> > old flag.
> 
> Hmm, I wonder if it would be better to use
> 
> jbd2_journal_start(...)
> 
> and
> 
> jbd2_journal_start_nofail(...)

	This API is markedly better to read.  Btw, does _nofail() mean no
possible failures, or just no memory errors?  If it is no failures, I'd
love to see the function become void.

> The tradeoff is that long-term, the code is more readable (as opposed
> to having people look up what a random "true" or "false" value means).
> But short-term, while it will make the patch smaller, it also makes
> the patch harder audit, since we need to look at all of the places
> where we _haven't_ made a change to make sure those call sites can
> tolerate an error return.

	I think we should start with jbd2_journal_start_can_fail() or
something like it, and change it back to jbd2_journal_start() in the
next window.  It's a silly name, but it catches exactly what you are
worried about.

Joel

-- 

Life's Little Instruction Book #94

	"Make it a habit to do nice things for people who 
	 will never find out."

			http://www.jlbec.org/
			jlbec@evilplan.org

  parent reply	other threads:[~2011-01-23  6:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-23  3:32 [PATCH 1/3] jbd2 : Make jbd2 transaction handle allocation to return errors and handle them gracefully Manish Katiyar
2011-01-23  5:40 ` Ted Ts'o
2011-01-23  5:53   ` Manish Katiyar
2011-01-23  6:29   ` Joel Becker [this message]
2011-01-24 13:31     ` Jan Kara
2011-01-24 17:20       ` Joel Becker
2011-01-25 11:40         ` Jan Kara
2011-01-25  0:06       ` Andreas Dilger
2011-01-25 11:46         ` Jan Kara
2011-01-30  5:40           ` Manish Katiyar
2011-02-04 15:53             ` Jan Kara
2011-02-04 22:44               ` Manish Katiyar
2011-04-25  0:06               ` Manish Katiyar
2011-01-25  6:47       ` Andreas Dilger

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=20110123062900.GA7436@noexit \
    --to=jlbec@evilplan.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=mkatiyar@gmail.com \
    --cc=tytso@mit.edu \
    /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).