]> www.infradead.org Git - users/hch/misc.git/commitdiff
bcachefs: fix prototype to bch2_alloc_sectors_start_trans()
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 1 Sep 2024 21:06:28 +0000 (17:06 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 21 Sep 2024 15:35:20 +0000 (11:35 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_foreground.h
fs/bcachefs/btree_update_interior.c
fs/bcachefs/ec.c

index 084b03b8c6e99600967b782176174434da2d6a11..87400a4b2b8aa532790b005f1d201ccd022d73a2 100644 (file)
@@ -748,7 +748,6 @@ static int add_new_bucket(struct bch_fs *c,
                           unsigned nr_replicas,
                           unsigned *nr_effective,
                           bool *have_cache,
-                          unsigned flags,
                           struct open_bucket *ob)
 {
        unsigned durability = ob_dev(c, ob)->mi.durability;
@@ -775,7 +774,7 @@ int bch2_bucket_alloc_set_trans(struct btree_trans *trans,
                      unsigned nr_replicas,
                      unsigned *nr_effective,
                      bool *have_cache,
-                     unsigned flags,
+                     enum bch_write_flags flags,
                      enum bch_data_type data_type,
                      enum bch_watermark watermark,
                      struct closure *cl)
@@ -815,7 +814,7 @@ int bch2_bucket_alloc_set_trans(struct btree_trans *trans,
 
                if (add_new_bucket(c, ptrs, devs_may_alloc,
                                   nr_replicas, nr_effective,
-                                  have_cache, flags, ob)) {
+                                  have_cache, ob)) {
                        ret = 0;
                        break;
                }
@@ -841,7 +840,7 @@ static int bucket_alloc_from_stripe(struct btree_trans *trans,
                         unsigned *nr_effective,
                         bool *have_cache,
                         enum bch_watermark watermark,
-                        unsigned flags,
+                        enum bch_write_flags flags,
                         struct closure *cl)
 {
        struct bch_fs *c = trans->c;
@@ -883,7 +882,7 @@ got_bucket:
 
        ret = add_new_bucket(c, ptrs, devs_may_alloc,
                             nr_replicas, nr_effective,
-                            have_cache, flags, ob);
+                            have_cache, ob);
 out_put_head:
        bch2_ec_stripe_head_put(c, h);
        return ret;
@@ -922,7 +921,7 @@ static int bucket_alloc_set_writepoint(struct bch_fs *c,
                                       unsigned nr_replicas,
                                       unsigned *nr_effective,
                                       bool *have_cache,
-                                      bool ec, unsigned flags)
+                                      bool ec)
 {
        struct open_buckets ptrs_skip = { .nr = 0 };
        struct open_bucket *ob;
@@ -934,7 +933,7 @@ static int bucket_alloc_set_writepoint(struct bch_fs *c,
                                        have_cache, ec, ob))
                        ret = add_new_bucket(c, ptrs, devs_may_alloc,
                                       nr_replicas, nr_effective,
-                                      have_cache, flags, ob);
+                                      have_cache, ob);
                else
                        ob_push(c, &ptrs_skip, ob);
        }
@@ -950,8 +949,7 @@ static int bucket_alloc_set_partial(struct bch_fs *c,
                                    unsigned nr_replicas,
                                    unsigned *nr_effective,
                                    bool *have_cache, bool ec,
-                                   enum bch_watermark watermark,
-                                   unsigned flags)
+                                   enum bch_watermark watermark)
 {
        int i, ret = 0;
 
@@ -983,7 +981,7 @@ static int bucket_alloc_set_partial(struct bch_fs *c,
 
                        ret = add_new_bucket(c, ptrs, devs_may_alloc,
                                             nr_replicas, nr_effective,
-                                            have_cache, flags, ob);
+                                            have_cache, ob);
                        if (ret)
                                break;
                }
@@ -1003,7 +1001,7 @@ static int __open_bucket_add_buckets(struct btree_trans *trans,
                        unsigned *nr_effective,
                        bool *have_cache,
                        enum bch_watermark watermark,
-                       unsigned flags,
+                       enum bch_write_flags flags,
                        struct closure *_cl)
 {
        struct bch_fs *c = trans->c;
@@ -1024,13 +1022,13 @@ static int __open_bucket_add_buckets(struct btree_trans *trans,
 
        ret = bucket_alloc_set_writepoint(c, ptrs, wp, &devs,
                                 nr_replicas, nr_effective,
-                                have_cache, erasure_code, flags);
+                                have_cache, erasure_code);
        if (ret)
                return ret;
 
        ret = bucket_alloc_set_partial(c, ptrs, wp, &devs,
                                 nr_replicas, nr_effective,
-                                have_cache, erasure_code, watermark, flags);
+                                have_cache, erasure_code, watermark);
        if (ret)
                return ret;
 
@@ -1071,7 +1069,7 @@ static int open_bucket_add_buckets(struct btree_trans *trans,
                        unsigned *nr_effective,
                        bool *have_cache,
                        enum bch_watermark watermark,
-                       unsigned flags,
+                       enum bch_write_flags flags,
                        struct closure *cl)
 {
        int ret;
@@ -1373,7 +1371,7 @@ int bch2_alloc_sectors_start_trans(struct btree_trans *trans,
                             unsigned nr_replicas,
                             unsigned nr_replicas_required,
                             enum bch_watermark watermark,
-                            unsigned flags,
+                            enum bch_write_flags flags,
                             struct closure *cl,
                             struct write_point **wp_ret)
 {
index 386d231ceca3f667f8871d32e540ca47c1fafc44..1a16fd5bd4f89bce5141df154ca6ab1b1e2d2d27 100644 (file)
@@ -155,9 +155,10 @@ static inline bool bch2_bucket_is_open_safe(struct bch_fs *c, unsigned dev, u64
        return ret;
 }
 
+enum bch_write_flags;
 int bch2_bucket_alloc_set_trans(struct btree_trans *, struct open_buckets *,
                      struct dev_stripe_state *, struct bch_devs_mask *,
-                     unsigned, unsigned *, bool *, unsigned,
+                     unsigned, unsigned *, bool *, enum bch_write_flags,
                      enum bch_data_type, enum bch_watermark,
                      struct closure *);
 
@@ -167,7 +168,7 @@ int bch2_alloc_sectors_start_trans(struct btree_trans *,
                                   struct bch_devs_list *,
                                   unsigned, unsigned,
                                   enum bch_watermark,
-                                  unsigned,
+                                  enum bch_write_flags,
                                   struct closure *,
                                   struct write_point **);
 
index 1433aefb47fdf5c66fcc40c5863cee593c13afe1..35e49197bc57054e4ec4e611728630dd74fb2b38 100644 (file)
@@ -16,6 +16,7 @@
 #include "clock.h"
 #include "error.h"
 #include "extents.h"
+#include "io_write.h"
 #include "journal.h"
 #include "journal_reclaim.h"
 #include "keylist.h"
index 141a4c63142f5bceb8b70a8a58973b91000d01a5..fa1be6a29d33fd1bce3a07c6a16b2842e492457d 100644 (file)
@@ -18,6 +18,7 @@
 #include "ec.h"
 #include "error.h"
 #include "io_read.h"
+#include "io_write.h"
 #include "keylist.h"
 #include "recovery.h"
 #include "replicas.h"