btrfs: convert to new i_version API
Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
a01179e6eb
commit
c7f88c4e78
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
#include <linux/iversion.h>
|
||||||
#include "delayed-inode.h"
|
#include "delayed-inode.h"
|
||||||
#include "disk-io.h"
|
#include "disk-io.h"
|
||||||
#include "transaction.h"
|
#include "transaction.h"
|
||||||
|
@ -1700,7 +1701,8 @@ static void fill_stack_inode_item(struct btrfs_trans_handle *trans,
|
||||||
btrfs_set_stack_inode_nbytes(inode_item, inode_get_bytes(inode));
|
btrfs_set_stack_inode_nbytes(inode_item, inode_get_bytes(inode));
|
||||||
btrfs_set_stack_inode_generation(inode_item,
|
btrfs_set_stack_inode_generation(inode_item,
|
||||||
BTRFS_I(inode)->generation);
|
BTRFS_I(inode)->generation);
|
||||||
btrfs_set_stack_inode_sequence(inode_item, inode->i_version);
|
btrfs_set_stack_inode_sequence(inode_item,
|
||||||
|
inode_peek_iversion(inode));
|
||||||
btrfs_set_stack_inode_transid(inode_item, trans->transid);
|
btrfs_set_stack_inode_transid(inode_item, trans->transid);
|
||||||
btrfs_set_stack_inode_rdev(inode_item, inode->i_rdev);
|
btrfs_set_stack_inode_rdev(inode_item, inode->i_rdev);
|
||||||
btrfs_set_stack_inode_flags(inode_item, BTRFS_I(inode)->flags);
|
btrfs_set_stack_inode_flags(inode_item, BTRFS_I(inode)->flags);
|
||||||
|
@ -1754,7 +1756,8 @@ int btrfs_fill_inode(struct inode *inode, u32 *rdev)
|
||||||
BTRFS_I(inode)->generation = btrfs_stack_inode_generation(inode_item);
|
BTRFS_I(inode)->generation = btrfs_stack_inode_generation(inode_item);
|
||||||
BTRFS_I(inode)->last_trans = btrfs_stack_inode_transid(inode_item);
|
BTRFS_I(inode)->last_trans = btrfs_stack_inode_transid(inode_item);
|
||||||
|
|
||||||
inode->i_version = btrfs_stack_inode_sequence(inode_item);
|
inode_set_iversion_queried(inode,
|
||||||
|
btrfs_stack_inode_sequence(inode_item));
|
||||||
inode->i_rdev = 0;
|
inode->i_rdev = 0;
|
||||||
*rdev = btrfs_stack_inode_rdev(inode_item);
|
*rdev = btrfs_stack_inode_rdev(inode_item);
|
||||||
BTRFS_I(inode)->flags = btrfs_stack_inode_flags(inode_item);
|
BTRFS_I(inode)->flags = btrfs_stack_inode_flags(inode_item);
|
||||||
|
|
|
@ -3778,7 +3778,8 @@ static int btrfs_read_locked_inode(struct inode *inode)
|
||||||
BTRFS_I(inode)->generation = btrfs_inode_generation(leaf, inode_item);
|
BTRFS_I(inode)->generation = btrfs_inode_generation(leaf, inode_item);
|
||||||
BTRFS_I(inode)->last_trans = btrfs_inode_transid(leaf, inode_item);
|
BTRFS_I(inode)->last_trans = btrfs_inode_transid(leaf, inode_item);
|
||||||
|
|
||||||
inode->i_version = btrfs_inode_sequence(leaf, inode_item);
|
inode_set_iversion_queried(inode,
|
||||||
|
btrfs_inode_sequence(leaf, inode_item));
|
||||||
inode->i_generation = BTRFS_I(inode)->generation;
|
inode->i_generation = BTRFS_I(inode)->generation;
|
||||||
inode->i_rdev = 0;
|
inode->i_rdev = 0;
|
||||||
rdev = btrfs_inode_rdev(leaf, inode_item);
|
rdev = btrfs_inode_rdev(leaf, inode_item);
|
||||||
|
@ -3946,7 +3947,8 @@ static void fill_inode_item(struct btrfs_trans_handle *trans,
|
||||||
&token);
|
&token);
|
||||||
btrfs_set_token_inode_generation(leaf, item, BTRFS_I(inode)->generation,
|
btrfs_set_token_inode_generation(leaf, item, BTRFS_I(inode)->generation,
|
||||||
&token);
|
&token);
|
||||||
btrfs_set_token_inode_sequence(leaf, item, inode->i_version, &token);
|
btrfs_set_token_inode_sequence(leaf, item, inode_peek_iversion(inode),
|
||||||
|
&token);
|
||||||
btrfs_set_token_inode_transid(leaf, item, trans->transid, &token);
|
btrfs_set_token_inode_transid(leaf, item, trans->transid, &token);
|
||||||
btrfs_set_token_inode_rdev(leaf, item, inode->i_rdev, &token);
|
btrfs_set_token_inode_rdev(leaf, item, inode->i_rdev, &token);
|
||||||
btrfs_set_token_inode_flags(leaf, item, BTRFS_I(inode)->flags, &token);
|
btrfs_set_token_inode_flags(leaf, item, BTRFS_I(inode)->flags, &token);
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
#include <linux/list_sort.h>
|
#include <linux/list_sort.h>
|
||||||
|
#include <linux/iversion.h>
|
||||||
#include "tree-log.h"
|
#include "tree-log.h"
|
||||||
#include "disk-io.h"
|
#include "disk-io.h"
|
||||||
#include "locking.h"
|
#include "locking.h"
|
||||||
|
@ -3609,7 +3610,8 @@ static void fill_inode_item(struct btrfs_trans_handle *trans,
|
||||||
btrfs_set_token_inode_nbytes(leaf, item, inode_get_bytes(inode),
|
btrfs_set_token_inode_nbytes(leaf, item, inode_get_bytes(inode),
|
||||||
&token);
|
&token);
|
||||||
|
|
||||||
btrfs_set_token_inode_sequence(leaf, item, inode->i_version, &token);
|
btrfs_set_token_inode_sequence(leaf, item,
|
||||||
|
inode_peek_iversion(inode), &token);
|
||||||
btrfs_set_token_inode_transid(leaf, item, trans->transid, &token);
|
btrfs_set_token_inode_transid(leaf, item, trans->transid, &token);
|
||||||
btrfs_set_token_inode_rdev(leaf, item, inode->i_rdev, &token);
|
btrfs_set_token_inode_rdev(leaf, item, inode->i_rdev, &token);
|
||||||
btrfs_set_token_inode_flags(leaf, item, BTRFS_I(inode)->flags, &token);
|
btrfs_set_token_inode_flags(leaf, item, BTRFS_I(inode)->flags, &token);
|
||||||
|
|
Loading…
Reference in New Issue