Changes by: cha0smaster
Update of /cvsroot/linux-ntfs/ntfsprogs/include/ntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15050/include/ntfs
Modified Files:
inode.h
Log Message:
- Implement FILE_NAME attributes update in index during inode sync and enable code that set/clean sparse bit. Also add new inode state bit FileNameDirty to indicate that FILE_NAME attributes need update. At least after attribute resize we leave absolutely consist volume.
- Bugfixes to collate.c and index.c.
- Minor formating fixed to ntfscp and ntfsinfo.
Index: inode.h
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/include/ntfs/inode.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- inode.h 22 Dec 2004 14:04:41 -0000 1.11
+++ inode.h 5 Jun 2005 14:55:08 -0000 1.12
@@ -45,6 +45,8 @@ typedef enum {
NI_Compressed, /* 1: Inode is compressed. */
NI_Encrypted, /* 1: Inode is encrypted. */
NI_Sparse, /* 1: Inode is sparse. */
+ NI_FileNameDirty, /* 1: FILE_NAME attributes need to be updated
+ in the index. */
} ntfs_inode_state_bits;
#define test_nino_flag(ni, flag) test_bit(NI_##flag, (ni)->state)
@@ -94,6 +96,17 @@ typedef enum {
#define NInoSetSparse(ni) set_nino_flag(ni, Sparse)
#define NInoClearSparse(ni) clear_nino_flag(ni, Sparse)
+#define NInoFileNameDirty(ni) \
+ test_nino_flag(ni, FileNameDirty)
+#define NInoFileNameSetDirty(ni) \
+ set_nino_flag(ni, FileNameDirty)
+#define NInoFileNameClearDirty(ni) \
+ clear_nino_flag(ni, FileNameDirty)
+#define NInoFileNameTestAndSetDirty(ni) \
+ test_and_set_nino_flag(ni, FileNameDirty)
+#define NInoFileNameTestAndClearDirty(ni) \
+ test_and_clear_nino_flag(ni, FileNameDirty)
+
/*
* The NTFS in-memory inode structure. It is just used as an extension to the
* fields already provided in the VFS inode.
@@ -126,6 +139,9 @@ struct _ntfs_inode {
void *private_data; /* Temp: for directory handling */
int ref_count;
+ /* Belows fields needed to update indexes. They valid if != -1. */
+ s64 data_size;
+ s64 allocated_size;
};
extern ntfs_inode *ntfs_inode_allocate(ntfs_volume *vol);
|