linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs-progs: fix a regression in mkfs.btrfs
@ 2013-08-08 10:51 Stefan Behrens
  2013-08-08 10:55 ` Filipe David Manana
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Behrens @ 2013-08-08 10:51 UTC (permalink / raw)
  To: linux-btrfs

Commit 55061a98 adds a cut & paste error that makes mkfs.btrfs fail
if leafsize != sectorsize.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
---
 utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils.c b/utils.c
index 15b991f..691b075 100644
--- a/utils.c
+++ b/utils.c
@@ -430,7 +430,7 @@ int make_btrfs(int fd, const char *device, const char *label,
 	ret = pwrite(fd, buf->data, sectorsize, blocks[0]);
 	if (ret < 0)
 		return -errno;
-	else if (ret != leafsize)
+	else if (ret != sectorsize)
 		return -EIO;
 
 	free(buf);
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Btrfs-progs: fix a regression in mkfs.btrfs
  2013-08-08 10:51 [PATCH] Btrfs-progs: fix a regression in mkfs.btrfs Stefan Behrens
@ 2013-08-08 10:55 ` Filipe David Manana
  0 siblings, 0 replies; 2+ messages in thread
From: Filipe David Manana @ 2013-08-08 10:55 UTC (permalink / raw)
  To: Stefan Behrens; +Cc: linux-btrfs@vger.kernel.org

On Thu, Aug 8, 2013 at 11:51 AM, Stefan Behrens
<sbehrens@giantdisaster.de> wrote:
> Commit 55061a98 adds a cut & paste error that makes mkfs.btrfs fail
> if leafsize != sectorsize.
>
> Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
> ---
>  utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utils.c b/utils.c
> index 15b991f..691b075 100644
> --- a/utils.c
> +++ b/utils.c
> @@ -430,7 +430,7 @@ int make_btrfs(int fd, const char *device, const char *label,
>         ret = pwrite(fd, buf->data, sectorsize, blocks[0]);
>         if (ret < 0)
>                 return -errno;
> -       else if (ret != leafsize)
> +       else if (ret != sectorsize)
>                 return -EIO;

Reviewed-by: Filipe Manana <fdmanana@gmail.com>

>
>         free(buf);
> --
> 1.8.3.4
>
> --
> 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



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-08 10:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-08 10:51 [PATCH] Btrfs-progs: fix a regression in mkfs.btrfs Stefan Behrens
2013-08-08 10:55 ` Filipe David Manana

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).