public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Markus Suvanto <markus.suvanto@gmail.com>
To: Sage Weil <sage@newdream.net>
Cc: Atila <atila.alr@dpf.gov.br>,
	linux-btrfs@vger.kernel.org, Chris Mason <chris.mason@oracle.com>
Subject: Re: [PATCH] Btrfs: fix arithmetic error in clone ioctl
Date: Wed, 26 Aug 2009 10:19:50 +0300	[thread overview]
Message-ID: <bcf98daa0908260019k67716e05i1d205c61545ab6f8@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0908251318450.1229@cobra.newdream.net>

2009/8/25 Sage Weil <sage@newdream.net>:
> Markus,
>
> This should fix your problem!
>

It works now , thanks!

-Markus


> ---
> Subject: [PATCH] Btrfs: fix arithmetic error in clone ioctl
>
> Fix an arithmetic error that was breaking extents cloned via the clon=
e
> ioctl starting in the second half of a file.
>
> Signed-off-by: Sage Weil <sage@newdream.net>
> ---
> =A0fs/btrfs/ioctl.c | =A0 =A03 +--
> =A01 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index e8e4ebe..63ca12a 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -1072,8 +1072,7 @@ static long btrfs_ioctl_clone(struct file *file=
, unsigned long srcfd,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0datao +=3D off - key.offset;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0datal -=3D off - key.offset;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (key=
=2Eoffset + datao + datal + key.offset >
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 off + len)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (key=
=2Eoffset + datao + datal > off + len)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0datal =3D off + len - key.offset - datao;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* dis=
ko =3D=3D 0 means it's a hole */
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!d=
isko)
> --
> 1.5.6.5
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-08-26  7:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bcf98daa0908232200r854444dwde3cfcf6b2181c6b@mail.gmail.com>
2009-08-24  5:17 ` The first character disappears Markus Suvanto
2009-08-24 11:52   ` Chris Mason
2009-08-24 12:51     ` [PATCH]Re: " Atila
2009-08-24 13:52       ` Markus Suvanto
2009-08-24 14:22         ` Markus Suvanto
2009-08-24 16:42           ` Markus Suvanto
2009-08-24 17:11             ` Sage Weil
2009-08-25  8:04               ` Markus Suvanto
2009-08-25 20:19                 ` [PATCH] Btrfs: fix arithmetic error in clone ioctl Sage Weil
2009-08-26  7:19                   ` Markus Suvanto [this message]
2009-08-27 17:44     ` [PATCH]Re: The first character disappears Atila

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=bcf98daa0908260019k67716e05i1d205c61545ab6f8@mail.gmail.com \
    --to=markus.suvanto@gmail.com \
    --cc=atila.alr@dpf.gov.br \
    --cc=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sage@newdream.net \
    /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