Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Zach Brown <zab@redhat.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] mkfs.btrfs: round all device sizes to sectorsize
Date: Fri, 25 Jul 2014 12:25:19 -0500	[thread overview]
Message-ID: <53D292FF.7030500@redhat.com> (raw)
In-Reply-To: <20140725171236.GJ17798@lenny.home.zabbo.net>

On 7/25/14, 12:12 PM, Zach Brown wrote:
> On Thu, Jul 24, 2014 at 11:27:32PM -0500, Eric Sandeen wrote:
>> make_btrfs() rounds down the first device size to a multiple of sectorsize:
> 
>                ^^^^^^^^^^^
> 
>> -	device->total_bytes = block_count;
>> +	device->total_bytes = (block_count / sectorsize) * sectorsize;
> 
> kerncompat.h:#define round_down(x, y) ((x) & ~__round_mask(x, y))
> 
> - z
> 

yeah yeah ;) this isn't copied kernel code but sure, that'd be better.

I'm trying to clean up this whole "we say blocks when we mean bytes!"
thing, and I'll include round_down() as well.

Thanks,
-Eric

  reply	other threads:[~2014-07-25 17:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25  4:27 [PATCH] mkfs.btrfs: round all device sizes to sectorsize Eric Sandeen
2014-07-25  6:52 ` Anand Jain
2014-07-25 17:12 ` Zach Brown
2014-07-25 17:25   ` Eric Sandeen [this message]
2014-07-25 18:04     ` Eric Sandeen

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=53D292FF.7030500@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=zab@redhat.com \
    /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