Changes by: antona
Update of /cvsroot/linux-ntfs/ntfs-driver-tng/linux/include/linux
In directory usw-pr-cvs1:/tmp/cvs-serv16061/linux/include/linux
Modified Files:
ntfs_fs.h ntfs_fs_sb.h
Log Message:
Merge my test branch back into the trunk.
Index: ntfs_fs.h
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfs-driver-tng/linux/include/linux/ntfs_fs.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -U2 -r1.17 -r1.18
--- ntfs_fs.h 2001/07/19 14:11:52 1.17
+++ ntfs_fs.h 2001/07/28 16:57:40 1.18
@@ -27,4 +27,6 @@
#include <linux/fs.h>
#include <linux/ntfs_layout.h>
+#include <linux/vmalloc.h> /* For __vmalloc() and PAGE_KERNEL. */
+#include <linux/nls.h>
typedef enum {
@@ -60,8 +62,24 @@
} ntfs_inode_state_bits;
+/*
+ * NOTE: We should be adding dirty mft records to a list somewhere and they
+ * should be independent of the (ntfs/vfs) inode structure so that an inode can
+ * be removed but the record can be left dirty for syncing later.
+ */
+
+#define NInoDirty(n_ino) test_bit(NI_Dirty, &(n_ino)->state)
+#define NInoSetDirty(n_ino) set_bit(NI_Dirty, &(n_ino)->state)
+#define NInoClearDirty(n_ino) clear_bit(NI_Dirty, &(n_ino)->state)
+
+#define NInoAttrList(n_ino) test_bit(NI_AttrList, &(n_ino)->state)
+#define NInoNonResident(n_ino) test_bit(NI_NonResident, &(n_ino)->state)
+#define NInoCompressed(n_ino) test_bit(NI_Compressed, &(n_ino)->state)
+#define NInoEncrypted(n_ino) test_bit(NI_Encrypted, &(n_ino)->state)
+
/* The little endian Unicode string $I30 as a global constant. */
extern const uchar_t $I30[5];
/* The various operations structs defined throughout the driver files. */
+extern struct super_operations ntfs_sops;
extern struct file_operations ntfs_file_ops;
extern struct inode_operations ntfs_file_inode_ops;
@@ -70,4 +88,7 @@
extern struct inode_operations ntfs_dir_inode_ops;
extern struct address_space_operations ntfs_dir_aops;
+extern struct file_operations ntfs_empty_file_ops;
+extern struct inode_operations ntfs_empty_inode_ops;
+extern struct address_space_operations ntfs_empty_aops;
/* The classical max and min macros. */
@@ -86,4 +107,15 @@
/**
+ * vmalloc_nofs - allocate any pages but don't allow calls into fs layer
+ * @size: number of bytes to allocate
+ *
+ * Allocate any pages but don't allow calls into fs layer.
+ */
+static inline void *vmalloc_nofs(unsigned long size)
+{
+ return __vmalloc(size, GFP_NOFS | __GFP_HIGHMEM, PAGE_KERNEL);
+}
+
+/**
* NTFS_SB - return the ntfs super block given a vfs super block
* @sb: VFS super block
@@ -196,4 +228,7 @@
/* From fs/ntfs/inode.c */
void ntfs_read_inode(struct inode *vfs_ino);
+void ntfs_read_inode_mount(struct inode *vfs_ino);
+void ntfs_dirty_inode(struct inode *vfs_ino);
+void ntfs_clear_inode(struct inode *vfs_ino);
/* From fs/ntfs/attrib.c */
Index: ntfs_fs_sb.h
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfs-driver-tng/linux/include/linux/ntfs_fs_sb.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -U2 -r1.11 -r1.12
--- ntfs_fs_sb.h 2001/07/18 01:08:30 1.11
+++ ntfs_fs_sb.h 2001/07/28 16:57:40 1.12
@@ -49,50 +49,31 @@
LCN mft_lcn; /* Cluster location of mft data. */
LCN mftmirr_lcn; /* Cluster location of copy of mft. */
- /* Misc NTFS information. */
+ /* Mount specific NTFS information. */
+ __u32 upcase_len; /* Number of entries in upcase[]. */
+ uchar_t *upcase; /* The upcase table. */
LCN mft_zone_end; /* First cluster beyond the mft zone. */
struct inode *mft_ino; /* The VFS inode of $MFT. */
-
-/* Currently unused below this line. */
-
- struct rw_semaphore lcnbmp_lock; /* Lock for serializing accesses to the
- cluster bitmap ($Bitmap/$DATA). */
struct rw_semaphore mftbmp_lock; /* Lock for serializing accesses to the
mft record bitmap ($MFT/$BITMAP). */
- __u32 upcase_len; /* Number of entries in upcase[]. */
- uchar_t *upcase; /* The upcase table. */
- __s64 nr_sectors; /* Number of sectors on the volume. */
union {
__s64 nr_mft_records; /* Number of records in the mft. */
__s64 nr_mft_bits; /* Number of bits in mft bitmap. */
};
+ struct address_space mftbmp_mapping; /* Page cache for $MFT/$BITMAP. */
+ run_list *mftbmp_rl; /* Run list for $MFT/$BITMAP. */
+ struct inode *mftmirr_ino; /* The VFS inode of $MFTMirr. */
+ struct inode *lcnbmp_ino; /* The VFS inode of $Bitmap. */
+ struct rw_semaphore lcnbmp_lock; /* Lock for serializing accesses to the
+ cluster bitmap ($Bitmap/$DATA). */
+ struct inode *vol_ino; /* The VFS inode of $Volume. */
+ unsigned long vol_flags; /* Volume flags (VOLUME_*). */
+ __u8 major_ver; /* Ntfs major version of volume. */
+ __u8 minor_ver; /* Ntfs minor version of volume. */
+ struct inode *root_ino; /* The VFS inode of the root
+ directory. */
+ struct inode *secure_ino; /* The VFS inode of $Secure (NTFS3.0+
+ only, otherwise NULL). */
+/* Currently unused below this line. */
__s64 serial_no; /* The volume serial number. */
- __u8 sector_size_bits; /* log2(sector_size) */
- union {
- __s8 clusters_per_mft_record; /* If mft_record_size >
- cluster_size, in bytes. */
- __s8 mft_records_per_cluster; /* In bytes, if cluster_size >
- mft_record_size. */
- };
- union {
- __s8 clusters_per_index_record; /* If index_record_size >
- cluster_size, in bytes. */
- __s8 index_records_per_cluster; /* In bytes, if cluster_size >
- index_record_size. */
- };
- union {
- struct {
- __u8 major_ver; /* Ntfs major version of volume. */
- __u8 minor_ver; /* Ntfs minor version of volume. */
- };
- __u16 version; /* For convenience. */
- };
- __u16 flags; /* Bit array of VOLUME_* flags. */
-/* On 8-byte boundary here, ofs = 86. */
- /* FIXME: Would be good to have direct access to lcn_bitmap and
- * mft_bitmap from here for fast read purposes. */
- struct inode *sys_inodes[16]; /* Array of pointers to the 16 system
- file inodes. NULL entries mean we
- have not got the inode yet. */
-
void *nls_map;
};
|