Merge tag 'x86_cache_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[linux-block.git] / block / blk-cgroup.h
index 26ce62663e279fe0741300aeb7af3513e5d9ccf1..624c03c8fe64e37f4ff742b27a1d1fa2d2588c39 100644 (file)
@@ -72,9 +72,10 @@ struct blkcg_gq {
        struct blkg_iostat_set          iostat;
 
        struct blkg_policy_data         *pd[BLKCG_MAX_POLS];
-
+#ifdef CONFIG_BLK_CGROUP_PUNT_BIO
        spinlock_t                      async_bio_lock;
        struct bio_list                 async_bios;
+#endif
        union {
                struct work_struct      async_bio_work;
                struct work_struct      free_work;
@@ -173,7 +174,6 @@ struct blkcg_policy {
 
        /* operations */
        blkcg_pol_alloc_cpd_fn          *cpd_alloc_fn;
-       blkcg_pol_init_cpd_fn           *cpd_init_fn;
        blkcg_pol_free_cpd_fn           *cpd_free_fn;
 
        blkcg_pol_alloc_pd_fn           *pd_alloc_fn;
@@ -207,15 +207,17 @@ void blkcg_print_blkgs(struct seq_file *sf, struct blkcg *blkcg,
 u64 __blkg_prfill_u64(struct seq_file *sf, struct blkg_policy_data *pd, u64 v);
 
 struct blkg_conf_ctx {
+       char                            *input;
+       char                            *body;
        struct block_device             *bdev;
        struct blkcg_gq                 *blkg;
-       char                            *body;
 };
 
-struct block_device *blkcg_conf_open_bdev(char **inputp);
+void blkg_conf_init(struct blkg_conf_ctx *ctx, char *input);
+int blkg_conf_open_bdev(struct blkg_conf_ctx *ctx);
 int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
-                  char *input, struct blkg_conf_ctx *ctx);
-void blkg_conf_finish(struct blkg_conf_ctx *ctx);
+                  struct blkg_conf_ctx *ctx);
+void blkg_conf_exit(struct blkg_conf_ctx *ctx);
 
 /**
  * bio_issue_as_root_blkg - see if this bio needs to be issued as root blkg
@@ -374,16 +376,6 @@ static inline void blkg_put(struct blkcg_gq *blkg)
                if (((d_blkg) = blkg_lookup(css_to_blkcg(pos_css),      \
                                            (p_blkg)->q)))
 
-bool __blkcg_punt_bio_submit(struct bio *bio);
-
-static inline bool blkcg_punt_bio_submit(struct bio *bio)
-{
-       if (bio->bi_opf & REQ_CGROUP_PUNT)
-               return __blkcg_punt_bio_submit(bio);
-       else
-               return false;
-}
-
 static inline void blkcg_bio_issue_init(struct bio *bio)
 {
        bio_issue_init(&bio->bi_issue, bio_sectors(bio));
@@ -505,8 +497,6 @@ static inline struct blkcg_gq *pd_to_blkg(struct blkg_policy_data *pd) { return
 static inline char *blkg_path(struct blkcg_gq *blkg) { return NULL; }
 static inline void blkg_get(struct blkcg_gq *blkg) { }
 static inline void blkg_put(struct blkcg_gq *blkg) { }
-
-static inline bool blkcg_punt_bio_submit(struct bio *bio) { return false; }
 static inline void blkcg_bio_issue_init(struct bio *bio) { }
 static inline void blk_cgroup_bio_start(struct bio *bio) { }
 static inline bool blk_cgroup_mergeable(struct request *rq, struct bio *bio) { return true; }