From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
"David S . Miller" <davem@davemloft.net>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Mike Snitzer <snitzer@redhat.com>,
Dan Williams <dan.j.williams@intel.com>,
Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH] block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h>
Date: Tue, 13 Feb 2018 17:54:15 +0900 [thread overview]
Message-ID: <20180213085415.GB1953@jagdpanzerIV> (raw)
In-Reply-To: <20180212190535.30057-1-bart.vanassche@wdc.com>
On (02/12/18 11:05), Bart Van Assche wrote:
[..]
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index ac4740cf74be..cf17626604c2 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -1026,14 +1026,25 @@ static inline int blk_rq_cur_bytes(const struct request *rq)
>
> extern unsigned int blk_rq_err_bytes(const struct request *rq);
>
> +/*
> + * Variables of type sector_t represent an offset or size that is a multiple of
> + * 2**9 bytes. Hence these two constants.
> + */
> +#ifndef SECTOR_SHIFT
> +enum { SECTOR_SHIFT = 9 };
> +#endif
> +#ifndef SECTOR_SIZE
> +enum { SECTOR_SIZE = 512 };
> +#endif
Shouldn't SECTOR_SIZE depend on SECTOR_SHIFT?
1 << SECTOR_SHIFT
-ss
next prev parent reply other threads:[~2018-02-13 8:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 19:05 [PATCH] block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h> Bart Van Assche
2018-02-13 8:43 ` Johannes Thumshirn
2018-02-13 16:15 ` Bart Van Assche
2018-02-13 8:54 ` Sergey Senozhatsky [this message]
2018-02-13 16:17 ` Bart Van Assche
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=20180213085415.GB1953@jagdpanzerIV \
--to=sergey.senozhatsky.work@gmail.com \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=snitzer@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