mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Linux: Implement FS_IOC_GETVERSION
Provide access to file generation number on Linux. Add test coverage. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org> Closes #12856
This commit is contained in:
@@ -201,6 +201,7 @@ export ZFSTEST_FILES='badsend
|
||||
file_trunc
|
||||
file_write
|
||||
get_diff
|
||||
getversion
|
||||
largest_file
|
||||
libzfs_input_check
|
||||
mkbusy
|
||||
|
||||
@@ -4051,6 +4051,20 @@ function stat_crtime #<path>
|
||||
esac
|
||||
}
|
||||
|
||||
function stat_generation #<path>
|
||||
{
|
||||
typeset path=$1
|
||||
|
||||
case $(uname) in
|
||||
Linux)
|
||||
getversion "${path}"
|
||||
;;
|
||||
*)
|
||||
stat -f %v "${path}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Run a command as if it was being run in a TTY.
|
||||
#
|
||||
# Usage:
|
||||
|
||||
Reference in New Issue
Block a user