Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1366714

Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big

From Christoph Hellwig <hch@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big
Date 2016-03-29 23:20 +0200
Message-ID <ri9do-3wv-7@gated-at.bofh.it> (permalink)
References <ri507-wp-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Mar 29, 2016 at 09:42:33AM -0700, Shaohua Li wrote:
> bio_alloc_bioset() allocates bvecs from bvec_slabs which can only
> allocate maximum 256 bvec (eg, 1M for 4k pages). We can't bump
> BLK_DEF_MAX_SECTORS to exceed this value otherwise bio_alloc_bioset will
> fail.

This might be true, but it's not a good enough reason.  Request based
driver couldn't care less about the limits of bio_alloc_bioset.

It seems the bug is that somone (would be great to know whoe exactly)
passes a too large value to bio_alloc_bioset. And given that we still
have bio_add_page around for actually adding pages to a bio it seems
like the proper fix would be to simply clamp down the actual allocation
and segment limit inside bio_alloc_bioset.  Which would also help to
eventually remove code doing just that in tons of callers.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Shaohua Li <shli@fb.com> - 2016-03-29 18:50 +0200
  Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Christoph Hellwig <hch@infradead.org> - 2016-03-29 23:20 +0200
    Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Shaohua Li <shli@fb.com> - 2016-03-30 00:10 +0200
      Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Christoph Hellwig <hch@infradead.org> - 2016-03-30 09:00 +0200
        Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Shaohua Li <shli@fb.com> - 2016-03-30 19:00 +0200
          Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Christoph Hellwig <hch@infradead.org> - 2016-03-30 19:50 +0200
          Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Kent Overstreet <kent.overstreet@gmail.com> - 2016-03-31 03:00 +0200
  Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Ming Lei <ming.lei@canonical.com> - 2016-03-30 03:40 +0200
    Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Shaohua Li <shli@fb.com> - 2016-03-30 04:30 +0200
      Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Ming Lei <ming.lei@canonical.com> - 2016-03-30 14:20 +0200
        Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Shaohua Li <shli@fb.com> - 2016-03-30 19:10 +0200
          Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Ming Lei <ming.lei@canonical.com> - 2016-03-31 02:50 +0200

csiph-web