Skip to content

Commit

Permalink
osdc/Filer: const fix for passed layouts
Browse files Browse the repository at this point in the history
...so that const references can be passed into
purge calls.

Signed-off-by: John Spray <[email protected]>
  • Loading branch information
John Spray committed Mar 8, 2017
1 parent 050dc5c commit 50f4783
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/osdc/Filer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,15 @@ struct PurgeRange {
int flags;
Context *oncommit;
int uncommitted;
PurgeRange(inodeno_t i, file_layout_t& l, const SnapContext& sc,
PurgeRange(inodeno_t i, const file_layout_t& l, const SnapContext& sc,
uint64_t fo, uint64_t no, ceph::real_time t, int fl,
Context *fin)
: ino(i), layout(l), snapc(sc), first(fo), num(no), mtime(t), flags(fl),
oncommit(fin), uncommitted(0) {}
};

int Filer::purge_range(inodeno_t ino,
file_layout_t *layout,
const file_layout_t *layout,
const SnapContext& snapc,
uint64_t first_obj, uint64_t num_obj,
ceph::real_time mtime,
Expand Down
4 changes: 2 additions & 2 deletions src/osdc/Filer.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class Filer {
}

void zero(inodeno_t ino,
file_layout_t *layout,
const file_layout_t *layout,
const SnapContext& snapc,
uint64_t offset,
uint64_t len,
Expand Down Expand Up @@ -273,7 +273,7 @@ class Filer {
}
// purge range of ino.### objects
int purge_range(inodeno_t ino,
file_layout_t *layout,
const file_layout_t *layout,
const SnapContext& snapc,
uint64_t first_obj, uint64_t num_obj,
ceph::real_time mtime,
Expand Down

0 comments on commit 50f4783

Please sign in to comment.