Hello David, On Thu, Mar 14, 2019 at 12:20 PM David Disseldorp <ddiss@xxxxxxx> wrote: > I'm working on adding Samba integration with CephFS snapshots, so that > they can be accessed in Explorer via file/folder right-click -> > restore previous versions. How are you actually planning to effect a restore from snapshot? > For this we need return a list of "@GMT-%Y.%m.%d-%H.%M.%S" labels back > to SMB clients in response to snapshot enumeration requests, where each > label corresponds to a snapshot. > To avoid the requirement for special @GMT-* snapshot naming in the .snap > directory, I'd hoped to determine the snapshot creation time from the > stat.btime field and return a label based on that. However, snapshot btime > fields appear to directly reference the btime of the snapshot source. > > Is there any way to determine the snapshot creation time? If not, would > anyone object to me adding a new xattr which carries this information, > e.g. "ceph.snap.btime", assuming the value is stored somewhere on the > MDS? The snapshot creation time appears to be available in the ceph_mds_snap_realm struct. It would just need wired up somehow. An xattr sounds appropriate. -- Patrick Donnelly