Skip to content

Commit

Permalink
block: Add some exports for bcachefs
Browse files Browse the repository at this point in the history
 - bio_set_pages_dirty(), bio_check_pages_dirty() - dio path
 - blk_status_to_str() - error messages
 - bio_add_folio() - this should definitely be exported for everyone,
   it's the modern version of bio_add_page()

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Cc: linux-block@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Link: https://lore.kernel.org/r/20230813182636.2966159-2-kent.overstreet@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Kent Overstreet authored and Jens Axboe committed Aug 14, 2023
1 parent e24721e commit 7ba3792
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions block/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,7 @@ void bio_set_pages_dirty(struct bio *bio)
set_page_dirty_lock(bvec->bv_page);
}
}
EXPORT_SYMBOL_GPL(bio_set_pages_dirty);

/*
* bio_check_pages_dirty() will check that all the BIO's pages are still dirty.
Expand Down Expand Up @@ -1531,6 +1532,7 @@ void bio_check_pages_dirty(struct bio *bio)
spin_unlock_irqrestore(&bio_dirty_lock, flags);
schedule_work(&bio_dirty_work);
}
EXPORT_SYMBOL_GPL(bio_check_pages_dirty);

static inline bool bio_remaining_done(struct bio *bio)
{
Expand Down
1 change: 1 addition & 0 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ const char *blk_status_to_str(blk_status_t status)
return "<null>";
return blk_errors[idx].name;
}
EXPORT_SYMBOL_GPL(blk_status_to_str);

/**
* blk_sync_queue - cancel any pending callbacks on a queue
Expand Down
1 change: 0 additions & 1 deletion block/blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ static inline void bio_integrity_free(struct bio *bio)

unsigned long blk_rq_timeout(unsigned long timeout);
void blk_add_timer(struct request *req);
const char *blk_status_to_str(blk_status_t status);

bool blk_attempt_plug_merge(struct request_queue *q, struct bio *bio,
unsigned int nr_segs);
Expand Down
1 change: 1 addition & 0 deletions include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ extern const char *blk_op_str(enum req_op op);

int blk_status_to_errno(blk_status_t status);
blk_status_t errno_to_blk_status(int errno);
const char *blk_status_to_str(blk_status_t status);

/* only poll the hardware once, don't continue until a completion was found */
#define BLK_POLL_ONESHOT (1 << 0)
Expand Down

0 comments on commit 7ba3792

Please sign in to comment.