All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Tao <bergwolf@gmail.com>
To: Akira Fujita <a-fujita@rs.jp.nec.com>
Cc: Theodore Tso <tytso@mit.edu>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 3/4]ext4: Return exchanged blocks count to user space in failure
Date: Wed, 02 Sep 2009 23:54:09 +0800	[thread overview]
Message-ID: <4A9E9521.2010701@gmail.com> (raw)
In-Reply-To: <4A9DE3EA.1080602@rs.jp.nec.com>

Hi, Akira,

Akira Fujita wrote:
> ext4: Return exchanged blocks count to user space in failure
> 
> From: Akira Fujita <a-fujita@rs.jp.nec.com>
> 
> Return exchanged blocks count (moved_len) to user space,
> if ext4_move_extents() failed on the way.
Even with the patch, I still don't see how users can fix EXT4_IOC_MOVE_EXT failures,
because the orig file itself may be broken.
> 
> Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com>
> ---
>  fs/ext4/ioctl.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
> index b0b434b..efd11c8 100644
> --- a/fs/ext4/ioctl.c
> +++ b/fs/ext4/ioctl.c
> @@ -255,10 +255,9 @@ setversion_out:
>  					me.donor_start, me.len, &me.moved_len);
>  		fput(donor_filp);
> 
> -		if (!err)
> -			if (copy_to_user((struct move_extent *)arg,
> -				&me, sizeof(me)))
> -				return -EFAULT;
> +		if (copy_to_user((struct move_extent *)arg, &me, sizeof(me)))
> +			return -EFAULT;
> +
>  		return err;
>  	}
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
Best Regards,
Peng Tao
State Key Laboratory of Networking and Switching Technology
Beijing Univ. of Posts and Telecoms.

  reply	other threads:[~2009-09-02 15:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02  3:18 [PATCH 3/4]ext4: Return exchanged blocks count to user space in failure Akira Fujita
2009-09-02 15:54 ` Peng Tao [this message]
2009-09-02 20:59   ` Greg Freemyer
2009-09-03  5:13     ` Peng Tao
2009-09-03 13:48       ` Greg Freemyer
2009-09-04  3:35         ` Peng Tao
2009-09-04  9:55       ` Akira Fujita
2009-09-04 16:43         ` Peng Tao
2009-09-08  4:11           ` Akira Fujita
2009-09-08  8:00             ` Peng Tao
2009-09-11  5:06               ` Akira Fujita
2009-09-11  5:28                 ` Peng Tao
2009-09-11 16:57                 ` Peng Tao
2009-09-14  6:16                   ` Akira Fujita
2009-09-06  3:37         ` Theodore Tso
2009-09-06  3:13 ` Theodore Tso

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=4A9E9521.2010701@gmail.com \
    --to=bergwolf@gmail.com \
    --cc=a-fujita@rs.jp.nec.com \
    --cc=linux-ext4@vger.kernel.org \
    --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 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.