mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 08:35:08 +08:00
bcachefs: bch2_btree_write_buffer_flush() -> bch2_btree_write_buffer_tryflush()
More accurate naming. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
d3083cf28d
commit
cb13f47139
@ -1817,7 +1817,7 @@ static void bch2_do_invalidates_work(struct work_struct *work)
|
||||
unsigned i;
|
||||
int ret = 0;
|
||||
|
||||
ret = bch2_btree_write_buffer_flush(trans);
|
||||
ret = bch2_btree_write_buffer_tryflush(trans);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
|
@ -299,7 +299,7 @@ int bch2_btree_write_buffer_flush_nocheck_rw(struct btree_trans *trans)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int bch2_btree_write_buffer_flush(struct btree_trans *trans)
|
||||
int bch2_btree_write_buffer_tryflush(struct btree_trans *trans)
|
||||
{
|
||||
struct bch_fs *c = trans->c;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
int bch2_btree_write_buffer_flush_locked(struct btree_trans *);
|
||||
int bch2_btree_write_buffer_flush_nocheck_rw(struct btree_trans *);
|
||||
int bch2_btree_write_buffer_flush_sync(struct btree_trans *);
|
||||
int bch2_btree_write_buffer_flush(struct btree_trans *);
|
||||
int bch2_btree_write_buffer_tryflush(struct btree_trans *);
|
||||
|
||||
int bch2_btree_insert_keys_write_buffer(struct btree_trans *);
|
||||
|
||||
|
@ -681,11 +681,10 @@ int __bch2_evacuate_bucket(struct moving_context *ctxt,
|
||||
bucket_size = bch_dev_bkey_exists(c, bucket.inode)->mi.bucket_size;
|
||||
fragmentation = a->fragmentation_lru;
|
||||
|
||||
ret = bch2_btree_write_buffer_flush(trans);
|
||||
if (ret) {
|
||||
bch_err_msg(c, ret, "flushing btree write buffer");
|
||||
ret = bch2_btree_write_buffer_tryflush(trans);
|
||||
bch_err_msg(c, ret, "flushing btree write buffer");
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
|
||||
while (!(ret = bch2_move_ratelimit(ctxt))) {
|
||||
if (is_kthread && kthread_should_stop())
|
||||
|
@ -153,11 +153,11 @@ static int bch2_copygc_get_buckets(struct moving_context *ctxt,
|
||||
|
||||
move_buckets_wait(ctxt, buckets_in_flight, false);
|
||||
|
||||
ret = bch2_btree_write_buffer_flush(trans);
|
||||
ret = bch2_btree_write_buffer_tryflush(trans);
|
||||
if (bch2_err_matches(ret, EROFS))
|
||||
return ret;
|
||||
|
||||
if (bch2_fs_fatal_err_on(ret, c, "%s: error %s from bch2_btree_write_buffer_flush()",
|
||||
if (bch2_fs_fatal_err_on(ret, c, "%s: error %s from bch2_btree_write_buffer_tryflush()",
|
||||
__func__, bch2_err_str(ret)))
|
||||
return ret;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user