mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-10 00:00:24 +03:00
posix_to_bcachefs: fix inode.bi_sectors updates
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
5f92627783
commit
97b8348d28
@ -282,7 +282,7 @@ static void write_data(struct bch_fs *c,
|
||||
closure_call(&op.cl, bch2_write, NULL, NULL);
|
||||
|
||||
BUG_ON(!(op.flags & BCH_WRITE_submitted));
|
||||
dst_inode->bi_sectors += len >> 9;
|
||||
dst_inode->bi_sectors += op.i_sectors_delta;
|
||||
|
||||
if (op.error)
|
||||
die("write error: %s", bch2_err_str(op.error));
|
||||
@ -371,6 +371,8 @@ static void copy_link(struct bch_fs *c,
|
||||
if (ret)
|
||||
die("bch2_fpunch error: %s", bch2_err_str(ret));
|
||||
|
||||
dst->bi_sectors += i_sectors_delta;
|
||||
|
||||
ret = readlink(src, src_buf, sizeof(src_buf));
|
||||
if (ret < 0)
|
||||
die("readlink error: %m");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user