Skip to content

Commit

Permalink
Merge PR ceph#45192 into wip-vshankar-testing-20221212.055337
Browse files Browse the repository at this point in the history
* refs/pull/45192/head:
	mds: use the whole string as the snapshot long name

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
  • Loading branch information
vshankar committed Dec 12, 2022
2 parents b26905d + 5511dd7 commit 26225ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .githubmap
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,4 @@ kamoltat Kamoltat Sirivadhna <ksirivad@redhat.com>
anthonyeleven Anthony D Atri <anthony.datri@gmail.com>
petrutlucian94 Lucian Petrut <lpetrut@cloudbasesolutions.com>
dparmar18 Dhairya Parmar <dparmar@redhat.com>
nmshelke Nikhilkumar Shelke <nshelke@redhat.com>
6 changes: 3 additions & 3 deletions src/mds/snap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ std::string_view SnapInfo::get_long_name() const
if (long_name.empty() ||
long_name.compare(1, name.size(), name) ||
long_name.find_last_of("_") != name.size() + 1) {
char nm[80];
snprintf(nm, sizeof(nm), "_%s_%llu", name.c_str(), (unsigned long long)ino);
long_name = nm;
std::ostringstream oss;
oss << "_" << name << "_" << (unsigned long long)ino;
long_name = oss.str();
}
return long_name;
}
Expand Down

0 comments on commit 26225ff

Please sign in to comment.