Skip to content

Commit

Permalink
os/kstore: implement rudimentary fiemap
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Jan 1, 2016
1 parent 7dc3cf6 commit d8c3318
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/os/kstore/KStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,7 @@ int KStore::fiemap(
len = o->onode.size;

if (offset > o->onode.size)
return 0;
goto out;

if (offset + len > o->onode.size) {
len = o->onode.size - offset;
Expand All @@ -1623,7 +1623,9 @@ int KStore::fiemap(
dout(20) << __func__ << " " << offset << "~" << len << " size "
<< o->onode.size << dendl;

out:
#warning write fiemap
m[0] = o->onode.size;

::encode(m, bl);
dout(20) << __func__ << " " << offset << "~" << len
Expand Down

0 comments on commit d8c3318

Please sign in to comment.