bcachefs: Don't cap ios in dio write path at 2 MB
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 30 Jun 2020 14:12:45 +0000 (10:12 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:42 +0000 (17:08 -0400)
It appears this was erronious, a different bug was responsible

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs-io.c

index f893bef34217e874049994cd2038418096e12335..d379581c2517702ef63bf39643d8d4ade8172ae9 100644 (file)
@@ -1797,22 +1797,12 @@ static long bch2_dio_write_loop(struct dio_write *dio)
                goto loop;
 
        while (1) {
-               size_t extra = dio->iter.count -
-                       min(BIO_MAX_VECS * PAGE_SIZE, dio->iter.count);
-
                if (kthread)
                        kthread_use_mm(dio->mm);
                BUG_ON(current->faults_disabled_mapping);
                current->faults_disabled_mapping = mapping;
 
-               /*
-                * Don't issue more than 2MB at once, the bcachefs io path in
-                * io.c can't bounce more than that:
-                */
-
-               dio->iter.count -= extra;
                ret = bio_iov_iter_get_pages(bio, &dio->iter);
-               dio->iter.count += extra;
 
                current->faults_disabled_mapping = NULL;
                if (kthread)