[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6149e97b0907191100y6c7172cdl99b690678b8b7ba8@mail.gmail.com>
Date: Mon, 20 Jul 2009 02:00:57 +0800
From: Peng Tao <bergwolf@...il.com>
To: linux-ext4@...r.kernel.org
Subject: Re: [PATCH 1/5] e4defrag: return more specific error message on ioctl
failure
oops, please ignore the [patch 1/5] series number. It was miss typed.
On Mon, Jul 20, 2009 at 1:47 AM, Peng Tao<bergwolf@...il.com> wrote:
> Currently e4defrag relies on the EXT4_IOC_MOVE_EXT ioctl to perform online
> defragmentation. However, this iotcl kernel patch is not available before
> 2.6.30-rc1. e4defrag shall fail without obvious reasons on systems running
> older kernels. The patch adds more detailed error message addressing this
> issue and prompts users with the minimal kernel version that is needed to
> run e4defrag.
>
> Signed-off-by: Peng Tao <bergwolf@...il.com>
> ---
> misc/e4defrag.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/misc/e4defrag.c b/misc/e4defrag.c
> index c25514a..f1c3008 100644
> --- a/misc/e4defrag.c
> +++ b/misc/e4defrag.c
> @@ -1553,7 +1553,11 @@ static int call_defrag(int fd, int donor_fd, const char *file,
> if (mode_flag & DETAIL) {
> printf("\n");
> PRINT_ERR_MSG_WITH_ERRNO(
> - "Failed to defrag");
> + "Failed to defrag with "
> + "EXT4_IOC_MOVE_EXT ioctl");
> + if (errno == ENOTTY)
> + printf("\tAt least 2.6.31-rc1 of"
> + " vallina kernel is required\n");
> } else {
> printf("\t[ NG ]\n");
> }
> --
> 1.6.2.GIT
>
>
--
Cheers,
Peng Tao
State Key Laboratory of Networking and Switching Technology
Beijing Univ. of Posts and Telecoms.
Powered by blists - more mailing lists