-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set timestamps of .zfs/snapshot/* directories to allow easy sorting #15110
Labels
Type: Feature
Feature request or new feature
Comments
easy enough, I s'pose
|
nabijaczleweli
added a commit
to nabijaczleweli/zfs
that referenced
this issue
Jul 28, 2023
Closes: openzfs#15110 Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
nabijaczleweli
added a commit
to nabijaczleweli/zfs
that referenced
this issue
Jul 28, 2023
Closes: openzfs#15110 Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
13 tasks
Try #15117 (this is probably easiest if you just |
nabijaczleweli
added a commit
to nabijaczleweli/zfs
that referenced
this issue
Jul 28, 2023
Closes: openzfs#15110 Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
nabijaczleweli
added a commit
to nabijaczleweli/zfs
that referenced
this issue
Jul 28, 2023
Closes: openzfs#15110 Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
behlendorf
pushed a commit
to behlendorf/zfs
that referenced
this issue
Aug 1, 2023
If looking up a snapdir inode failed, hold pool config – hold the snapshot – get its creation property – release it – release it, then use that as the [amc]time in the allocated inode. If that fails then fall back to current time. No performance impact since this is only done when allocating a new snapdir inode. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#15110 Closes openzfs#15117
7 tasks
behlendorf
pushed a commit
that referenced
this issue
Aug 2, 2023
If looking up a snapdir inode failed, hold pool config – hold the snapshot – get its creation property – release it – release it, then use that as the [amc]time in the allocated inode. If that fails then fall back to current time. No performance impact since this is only done when allocating a new snapdir inode. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #15110 Closes #15117
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this issue
Dec 12, 2023
If looking up a snapdir inode failed, hold pool config – hold the snapshot – get its creation property – release it – release it, then use that as the [amc]time in the allocated inode. If that fails then fall back to current time. No performance impact since this is only done when allocating a new snapdir inode. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#15110 Closes openzfs#15117
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature would like to see added to OpenZFS
In a
.zfs/snapshot
directory, it would be useful if snapshot subdirectories had theirmtime
attribute set to the snapshot creation timestamp.How will this feature improve OpenZFS?
If
mtime
were set, then withls -l
one could quickly see snapshot timestamps. "When was this snapshot created" is the most important fact about a snapshot. When I need to restore, I generally want to restore the newest snapshot. When I'm running out of disk space, I want to destroy the oldest snapshot. I'd like to usels -l
to see and sort by timestamp, rather thanzfs list -t snapshot -s creation -o name <fs>
.Additional context
Currently (e.g zfs 2.1.5) the snapshot directory timestamps are not set usefully. E.g. here are the directory's timestamps for a recently created snapshot. None of them equal the snapshot's 'creation' property:
The text was updated successfully, but these errors were encountered: