Btrfs: Add inode sequence number for NFS and reserved space in a few structs
This adds a sequence number to the btrfs inode that is increased on
every update. NFS will be able to use that to detect when an inode has
changed, without relying on inaccurate time fields.
While we're here, this also:
Puts reserved space into the super block and inode
Adds a log root transid to the super so we can pick the newest super
based on the fsync log as well as the main transaction ID. For now
the log root transid is always zero, but that'll get fixed.
Adds a starting offset to the dev_item. This will let us do better
alignment calculations if we know the start of a partition on the disk.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 0b2e623..1b9ec1a 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -49,9 +49,6 @@
*/
struct extent_io_tree io_failure_tree;
- /* held while inserting checksums to avoid races */
- struct mutex csum_mutex;
-
/* held while inesrting or deleting extents from files */
struct mutex extent_mutex;
@@ -79,6 +76,9 @@
*/
u64 generation;
+ /* sequence number for NFS changes */
+ u64 sequence;
+
/*
* transid of the trans_handle that last modified this inode
*/