summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/chardev.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-01-23 11:45:22 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2025-03-14 21:02:12 -0400
commite63cf203d781902a8d3af3333ccf6382f8c3d416 (patch)
tree9166580b4ac81eea28de2123c0b41755cca8e192 /fs/bcachefs/chardev.c
parentbcachefs: Read/move path counter work (diff)
downloadlinux-e63cf203d781902a8d3af3333ccf6382f8c3d416.tar.gz
linux-e63cf203d781902a8d3af3333ccf6382f8c3d416.zip
bcachefs: Convert migrate to move_data_phys()
Iterating over backpointers on a specific device is potentially much cheaper than walking all filesystem data. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/chardev.c')
-rw-r--r--fs/bcachefs/chardev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/chardev.c b/fs/bcachefs/chardev.c
index b38a3c6fe04c..57d55b3ddc71 100644
--- a/fs/bcachefs/chardev.c
+++ b/fs/bcachefs/chardev.c
@@ -315,8 +315,10 @@ static int bch2_data_thread(void *arg)
ctx->thr.ret = bch2_data_job(ctx->c, &ctx->stats, ctx->arg);
if (ctx->thr.ret == -BCH_ERR_device_offline)
ctx->stats.ret = BCH_IOCTL_DATA_EVENT_RET_device_offline;
- else
+ else {
ctx->stats.ret = BCH_IOCTL_DATA_EVENT_RET_done;
+ ctx->stats.data_type = (int) DATA_PROGRESS_DATA_TYPE_done;
+ }
return 0;
}