Changes by: uvman
Update of /cvs/linux-ntfs/ntfsprogs/libntfs
In directory delta357:/tmp/cvs-serv21663/libntfs
Modified Files:
index.c
Log Message:
Move ntfs_index_entry_mark_dirty() from index.h to index.c. (Szaka)
Index: index.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/index.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -p -r1.34 -r1.35
--- index.c 28 Oct 2006 23:45:22 -0000 1.34
+++ index.c 29 Oct 2006 00:55:45 -0000 1.35
@@ -46,6 +46,28 @@
#include "bitmap.h"
#include "support.h"
+/**
+ * ntfs_index_entry_mark_dirty - mark an index entry dirty
+ * @ictx: ntfs index context describing the index entry
+ *
+ * Mark the index entry described by the index entry context @ictx dirty.
+ *
+ * If the index entry is in the index root attribute, simply mark the inode
+ * containing the index root attribute dirty. This ensures the mftrecord, and
+ * hence the index root attribute, will be written out to disk later.
+ *
+ * If the index entry is in an index block belonging to the index allocation
+ * attribute, set ib_dirty to TRUE, thus index block will be updated during
+ * ntfs_index_ctx_put.
+ */
+void ntfs_index_entry_mark_dirty(ntfs_index_context *ictx)
+{
+ if (ictx->is_in_root)
+ ntfs_inode_mark_dirty(ictx->actx->ntfs_ino);
+ else
+ ictx->ib_dirty = TRUE;
+}
+
static s64 ntfs_ib_vcn_to_pos(ntfs_index_context *icx, VCN vcn)
{
return vcn << icx->vcn_size_bits;
|