projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[XFS] Combine the XFS and Linux inodes
[deliverable/linux.git]
/
fs
/
xfs
/
linux-2.6
/
xfs_iops.c
diff --git
a/fs/xfs/linux-2.6/xfs_iops.c
b/fs/xfs/linux-2.6/xfs_iops.c
index 095d271f34349e01175eecd3e4c362dbcc1dccce..37bb1012aff13d365ae06c672d9230db763bec02 100644
(file)
--- a/
fs/xfs/linux-2.6/xfs_iops.c
+++ b/
fs/xfs/linux-2.6/xfs_iops.c
@@
-64,14
+64,14
@@
xfs_synchronize_atime(
{
struct inode *inode = VFS_I(ip);
{
struct inode *inode = VFS_I(ip);
- if (
inode
) {
+ if (
!(inode->i_state & I_CLEAR)
) {
ip->i_d.di_atime.t_sec = (__int32_t)inode->i_atime.tv_sec;
ip->i_d.di_atime.t_nsec = (__int32_t)inode->i_atime.tv_nsec;
}
}
/*
ip->i_d.di_atime.t_sec = (__int32_t)inode->i_atime.tv_sec;
ip->i_d.di_atime.t_nsec = (__int32_t)inode->i_atime.tv_nsec;
}
}
/*
- * If the linux inode
exists
, mark it dirty.
+ * If the linux inode
is valid
, mark it dirty.
* Used when commiting a dirty inode into a transaction so that
* the inode will get written back by the linux code
*/
* Used when commiting a dirty inode into a transaction so that
* the inode will get written back by the linux code
*/
@@
-81,7
+81,7
@@
xfs_mark_inode_dirty_sync(
{
struct inode *inode = VFS_I(ip);
{
struct inode *inode = VFS_I(ip);
- if (
inode
)
+ if (
!(inode->i_state & (I_WILL_FREE|I_FREEING|I_CLEAR))
)
mark_inode_dirty_sync(inode);
}
mark_inode_dirty_sync(inode);
}
@@
-128,7
+128,7
@@
xfs_ichgtime(
if (sync_it) {
SYNCHRONIZE();
ip->i_update_core = 1;
if (sync_it) {
SYNCHRONIZE();
ip->i_update_core = 1;
-
mark_inode_dirty_sync(inode
);
+
xfs_mark_inode_dirty_sync(ip
);
}
}
}
}
@@
-766,12
+766,21
@@
xfs_diflags_to_iflags(
* When reading existing inodes from disk this is called directly
* from xfs_iget, when creating a new inode it is called from
* xfs_ialloc after setting up the inode.
* When reading existing inodes from disk this is called directly
* from xfs_iget, when creating a new inode it is called from
* xfs_ialloc after setting up the inode.
+ *
+ * We are always called with an uninitialised linux inode here.
+ * We need to initialise the necessary fields and take a reference
+ * on it.
*/
void
xfs_setup_inode(
struct xfs_inode *ip)
{
*/
void
xfs_setup_inode(
struct xfs_inode *ip)
{
- struct inode *inode = ip->i_vnode;
+ struct inode *inode = &ip->i_vnode;
+
+ inode->i_ino = ip->i_ino;
+ inode->i_state = I_NEW|I_LOCK;
+ inode_add_to_lists(ip->i_mount->m_super, inode);
+ ASSERT(atomic_read(&inode->i_count) == 1);
inode->i_mode = ip->i_d.di_mode;
inode->i_nlink = ip->i_d.di_nlink;
inode->i_mode = ip->i_d.di_mode;
inode->i_nlink = ip->i_d.di_nlink;
This page took
0.026772 seconds
and
5
git commands to generate.