inode.c (0ca1f7ceb1991099ed5273885ebcf4323948c72e) inode.c (8929ecfa50f266163832eeacfbc3642ed5eb83b6)
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 4046 unchanged lines hidden (view full) ---

4055}
4056
4057int btrfs_write_inode(struct inode *inode, struct writeback_control *wbc)
4058{
4059 struct btrfs_root *root = BTRFS_I(inode)->root;
4060 struct btrfs_trans_handle *trans;
4061 int ret = 0;
4062
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 4046 unchanged lines hidden (view full) ---

4055}
4056
4057int btrfs_write_inode(struct inode *inode, struct writeback_control *wbc)
4058{
4059 struct btrfs_root *root = BTRFS_I(inode)->root;
4060 struct btrfs_trans_handle *trans;
4061 int ret = 0;
4062
4063 if (root->fs_info->btree_inode == inode)
4063 if (BTRFS_I(inode)->dummy_inode)
4064 return 0;
4065
4066 if (wbc->sync_mode == WB_SYNC_ALL) {
4067 trans = btrfs_join_transaction(root, 1);
4068 btrfs_set_trans_block_group(trans, inode);
4069 ret = btrfs_commit_transaction(trans, root);
4070 }
4071 return ret;

--- 4 unchanged lines hidden (view full) ---

4076 * inode changes. But, it is most likely to find the inode in cache.
4077 * FIXME, needs more benchmarking...there are no reasons other than performance
4078 * to keep or drop this code.
4079 */
4080void btrfs_dirty_inode(struct inode *inode)
4081{
4082 struct btrfs_root *root = BTRFS_I(inode)->root;
4083 struct btrfs_trans_handle *trans;
4064 return 0;
4065
4066 if (wbc->sync_mode == WB_SYNC_ALL) {
4067 trans = btrfs_join_transaction(root, 1);
4068 btrfs_set_trans_block_group(trans, inode);
4069 ret = btrfs_commit_transaction(trans, root);
4070 }
4071 return ret;

--- 4 unchanged lines hidden (view full) ---

4076 * inode changes. But, it is most likely to find the inode in cache.
4077 * FIXME, needs more benchmarking...there are no reasons other than performance
4078 * to keep or drop this code.
4079 */
4080void btrfs_dirty_inode(struct inode *inode)
4081{
4082 struct btrfs_root *root = BTRFS_I(inode)->root;
4083 struct btrfs_trans_handle *trans;
4084 int ret;
4084
4085
4086 if (BTRFS_I(inode)->dummy_inode)
4087 return;
4088
4085 trans = btrfs_join_transaction(root, 1);
4086 btrfs_set_trans_block_group(trans, inode);
4089 trans = btrfs_join_transaction(root, 1);
4090 btrfs_set_trans_block_group(trans, inode);
4087 btrfs_update_inode(trans, root, inode);
4091
4092 ret = btrfs_update_inode(trans, root, inode);
4093 if (ret)
4094 printk(KERN_ERR"btrfs: fail to dirty inode %lu error %d\n",
4095 inode->i_ino, ret);
4096
4088 btrfs_end_transaction(trans, root);
4089}
4090
4091/*
4092 * find the highest existing sequence number in a directory
4093 * and then set the in-memory index_cnt variable to reflect
4094 * free sequence numbers
4095 */

--- 2054 unchanged lines hidden ---
4097 btrfs_end_transaction(trans, root);
4098}
4099
4100/*
4101 * find the highest existing sequence number in a directory
4102 * and then set the in-memory index_cnt variable to reflect
4103 * free sequence numbers
4104 */

--- 2054 unchanged lines hidden ---