mirror of
https://github.com/ceph/ceph
synced 2025-01-29 22:43:40 +00:00
Merge PR #45192 into main
* refs/pull/45192/head: mds: use the whole string as the snapshot long name Reviewed-by: Jos Collin <jcollin@redhat.com> Reviewed-by: Ramana Raja <rraja@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
This commit is contained in:
commit
aa403a9532
@ -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>
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user