From: Jan Kara <jack@suse.cz>
To: Changwoo Min <changwoo.m@gmail.com>
Cc: jack@suse.cz, linux-kernel@vger.kernel.org, taesoo@gatech.edu,
changwoo@gatech.edu, sanidhya@gatech.edu, blee@gatech.edu,
csong84@gatech.edu
Subject: Re: [PATCH] udf: return correct errno for udf_update_inode()
Date: Wed, 1 Apr 2015 12:46:15 +0200 [thread overview]
Message-ID: <20150401104615.GG26339@quack.suse.cz> (raw)
In-Reply-To: <1427066269-16372-1-git-send-email-changwoo@gatech.edu>
On Sun 22-03-15 19:17:49, Changwoo Min wrote:
> Instead of -ENOMEM, properly return -EIO udf_update_inode()
> error, similar/consistent to the rest of filesystems.
>
> Signed-off-by: Changwoo Min <changwoo.m@gmail.com>
So I actually had a look how we treat results from udf_tgetblk(). The
truth is:
Once we return ENOMEM. Once we return EIO. Once we just return NULL from
the function and it will get eventually translated to something like EIO.
Once we just crash. Twice we just ignore the problem (as it is during
readahead). So saying there is any consistency among the callers of
udf_tgetblk() is just wrong.
But looking into when getblk() can fail to return the buffer, EIO is
probably a better return value. So I've take the patch.
Honza
>
> ---
> fs/udf/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/udf/inode.c b/fs/udf/inode.c
> index a445d59..c758023 100644
> --- a/fs/udf/inode.c
> +++ b/fs/udf/inode.c
> @@ -1637,7 +1637,7 @@ static int udf_update_inode(struct inode *inode, int do_sync)
> udf_get_lb_pblock(inode->i_sb, &iinfo->i_location, 0));
> if (!bh) {
> udf_debug("getblk failure\n");
> - return -ENOMEM;
> + return -EIO;
> }
>
> lock_buffer(bh);
> --
> 1.9.1
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2015-04-01 10:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-22 23:17 Changwoo Min
2015-04-01 10:46 ` Jan Kara [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=20150401104615.GG26339@quack.suse.cz \
--to=jack@suse.cz \
--cc=blee@gatech.edu \
--cc=changwoo.m@gmail.com \
--cc=changwoo@gatech.edu \
--cc=csong84@gatech.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=sanidhya@gatech.edu \
--cc=taesoo@gatech.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
all inboxes | Powered by JetHome®