All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <elder@dreamhost.com>
To: Sage Weil <sage@newdream.net>
Cc: ceph-devel@vger.kernel.org
Subject: Re: [PATCH 2/2] rbd: small changes
Date: Fri, 02 Mar 2012 15:26:00 -0800	[thread overview]
Message-ID: <4F515708.2060005@dreamhost.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1203021331390.6413@cobra.newdream.net>

On 03/02/2012 01:31 PM, Sage Weil wrote:
>> >  +/*
>> >  + * The basic unit of block I/O is a sector.  It is interpreted in a
>> >  + * number of contexts in Linux (blk, bio, genhd), but the default is
>> >  + * universally 512 bytes.  These symbols are just slightly more
>> >  + * meaningful than the bare numbers they represent.
>> >  + */
>> >  +#define	SECTOR_SHIFT	9
>> >  +#define	SECTOR_SIZE	(1ULL<<  SECTOR_SHIFT)
>> >  +
> I would expect the block layer already has #defines for these?

I would too, but I don't see it.  I think "9" and "512" are
considered obvious enough.

I still prefer this though; if nothing else it makes it easy
to search for places we are using things with this meaning.

					-Alex

      reply	other threads:[~2012-03-02 23:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29  4:02 [PATCH 0/2] rbd: more miscellaneous cleanups Alex Elder
2012-02-29  4:37 ` [PATCH 1/2] rbd: do some refactoring Alex Elder
2012-02-29  4:37 ` [PATCH 2/2] rbd: small changes Alex Elder
2012-03-02 21:31   ` Sage Weil
2012-03-02 23:26     ` Alex Elder [this message]

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=4F515708.2060005@dreamhost.com \
    --to=elder@dreamhost.com \
    --cc=ceph-devel@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 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.