summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-09-26 18:21:07 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2022-10-03 23:55:45 -0400
commitd6c2dfe4c52ca857cb6a657c196392a52342cf45 (patch)
treefb73cab53dbcbc46f066d3ffcbbc4a1856f788aa
parentcc1fdb1136fe4dcd208a7892380b0f6f6716f35a (diff)
bcachefs: Kill io_in_flight semaphore
This used to be needed more for buffered IO, but now the block layer has writeback throttling - we can delete this now. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/bcachefs.h1
-rw-r--r--fs/bcachefs/fs-io.c7
-rw-r--r--fs/bcachefs/super.c2
3 files changed, 0 insertions, 10 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h
index 826598373826..ccac2a3fcdf7 100644
--- a/fs/bcachefs/bcachefs.h
+++ b/fs/bcachefs/bcachefs.h
@@ -814,7 +814,6 @@ struct bch_fs {
struct mutex gc_gens_lock;
/* IO PATH */
- struct semaphore io_in_flight;
struct bio_set bio_read;
struct bio_set bio_read_split;
struct bio_set bio_write;
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c
index c99fc56fb7cf..7d45f4863469 100644
--- a/fs/bcachefs/fs-io.c
+++ b/fs/bcachefs/fs-io.c
@@ -1223,8 +1223,6 @@ static void bch2_writepage_io_done(struct closure *cl)
struct bio_vec *bvec;
unsigned i;
- up(&io->op.c->io_in_flight);
-
if (io->op.error) {
set_bit(EI_INODE_ERROR, &io->inode->ei_flags);
@@ -1287,8 +1285,6 @@ static void bch2_writepage_do_io(struct bch_writepage_state *w)
{
struct bch_writepage_io *io = w->io;
- down(&io->op.c->io_in_flight);
-
w->io = NULL;
closure_call(&io->op.cl, bch2_write, NULL, &io->cl);
continue_at(&io->cl, bch2_writepage_io_done, NULL);
@@ -2068,8 +2064,6 @@ static long bch2_dio_write_loop(struct dio_write *dio)
if (dio->loop)
goto loop;
- down(&c->io_in_flight);
-
while (1) {
iter_count = dio->iter.count;
@@ -2200,7 +2194,6 @@ loop:
ret = dio->op.error ?: ((long) dio->written << 9);
err:
- up(&c->io_in_flight);
bch2_pagecache_block_put(&inode->ei_pagecache_lock);
bch2_quota_reservation_put(c, inode, &dio->quota_res);
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c
index ee31c61fe850..a824e16079d5 100644
--- a/fs/bcachefs/super.c
+++ b/fs/bcachefs/super.c
@@ -686,8 +686,6 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts)
seqcount_init(&c->usage_lock);
- sema_init(&c->io_in_flight, 64);
-
c->copy_gc_enabled = 1;
c->rebalance.enabled = 1;
c->promote_whole_extents = true;