Message ID | 1459354637-17415-3-git-send-email-ming.lei@canonical.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Mar 31, 2016 at 12:17:11AM +0800, Ming Lei wrote: > We will use bvec iterator to implement iterate_bvec(): lib/iov_iter.c. > > Reviewed-by: Christoph Hellwig <hch@lst.de> > Signed-off-by: Ming Lei <ming.lei@canonical.com> > --- > include/linux/blk_types.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h > index 86a38ea..fd8527b 100644 > --- a/include/linux/blk_types.h > +++ b/include/linux/blk_types.h > @@ -26,8 +26,6 @@ struct bio_vec { > unsigned int bv_offset; > }; > > -#ifdef CONFIG_BLOCK > - > struct bvec_iter { > sector_t bi_sector; /* device address in 512 byte > sectors */ > @@ -39,6 +37,8 @@ struct bvec_iter { > current bvec */ > }; I didn't catch this earlier, but shouldn't this also move to bvec_iter.h? Or maybe just create a linux/bvec.h for the bvec, bvec_iter and bvec iter macros given that those are the types used outside the block layer as well. -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Mar 31, 2016 at 1:19 AM, Christoph Hellwig <hch@infradead.org> wrote: > On Thu, Mar 31, 2016 at 12:17:11AM +0800, Ming Lei wrote: >> We will use bvec iterator to implement iterate_bvec(): lib/iov_iter.c. >> >> Reviewed-by: Christoph Hellwig <hch@lst.de> >> Signed-off-by: Ming Lei <ming.lei@canonical.com> >> --- >> include/linux/blk_types.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h >> index 86a38ea..fd8527b 100644 >> --- a/include/linux/blk_types.h >> +++ b/include/linux/blk_types.h >> @@ -26,8 +26,6 @@ struct bio_vec { >> unsigned int bv_offset; >> }; >> >> -#ifdef CONFIG_BLOCK >> - >> struct bvec_iter { >> sector_t bi_sector; /* device address in 512 byte >> sectors */ >> @@ -39,6 +37,8 @@ struct bvec_iter { >> current bvec */ >> }; > > I didn't catch this earlier, but shouldn't this also move to > bvec_iter.h? Or maybe just create a linux/bvec.h for the bvec, bvec_iter > and bvec iter macros given that those are the types used outside the > block layer as well. That way may cause trouble to blk_type.h because it needs bvec_iter, then looks not good to always include bvec_iter.h into blk_type.h. Thanks, Ming -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Mar 31, 2016 at 09:02:59AM +0800, Ming Lei wrote: > That way may cause trouble to blk_type.h because it needs bvec_iter, > then looks not good to always include bvec_iter.h into blk_type.h. I'd expect bvec.h to be always included in blk_types.h, and replace the inclusion of blk_types.h in fs.h eventually. -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Mar 31, 2016 at 3:52 PM, Christoph Hellwig <hch@infradead.org> wrote: > On Thu, Mar 31, 2016 at 09:02:59AM +0800, Ming Lei wrote: >> That way may cause trouble to blk_type.h because it needs bvec_iter, >> then looks not good to always include bvec_iter.h into blk_type.h. > > I'd expect bvec.h to be always included in blk_types.h, and replace That should be fine, but blk_types.h will become more fat. > the inclusion of blk_types.h in fs.h eventually. I guess it can't be done because fs.h need 'struct bio'. thanks, Ming -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 86a38ea..fd8527b 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -26,8 +26,6 @@ struct bio_vec { unsigned int bv_offset; }; -#ifdef CONFIG_BLOCK - struct bvec_iter { sector_t bi_sector; /* device address in 512 byte sectors */ @@ -39,6 +37,8 @@ struct bvec_iter { current bvec */ }; +#ifdef CONFIG_BLOCK + /* * main unit of I/O for the block layer and lower layers (ie drivers and * stacking drivers)