diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-10-20 00:22:03 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2019-10-20 00:31:02 -0400 |
commit | 82ea7be49f88ffd6811eb38c8f13ad423ba06817 (patch) | |
tree | fe66a497919775684d41e53644b865102b99d385 | |
parent | fc4f1d59cf9330bbb27cd12c459706aa5e7fe33c (diff) |
bcachefs: Limit bios in writepages path to 256M
This works around a bug where bio_full() doesn't check for
bio->bi_iter.bi_size overflowing - and, we don't really want to build
bios that are that big anyways.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | fs/bcachefs/fs-io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index 770fed19740d..3fb12c1b24bc 100644 --- a/fs/bcachefs/fs-io.c +++ b/fs/bcachefs/fs-io.c @@ -1204,6 +1204,7 @@ do_io: if (w->io && (w->io->op.res.nr_replicas != nr_replicas_this_write || bio_full(&w->io->op.wbio.bio) || + w->io->op.wbio.bio.bi_iter.bi_size >= (256U << 20) || bio_end_sector(&w->io->op.wbio.bio) != sector)) bch2_writepage_do_io(w); |