[PATCH] NTFS 2.0.7 release (small cleanup)

Anton Altaparmakov (aia21@cantab.net)
Sat, 11 May 2002 16:10:17 +0100 (BST)


Hi all, I just submitted this patch updating ntfs to 2.0.7 to Linus
for inclusion. Patch is also available from the ntfs bitkeeper tree:
bk://linux-ntfs.bkbits.net/ntfs-tng-2.5

This will update the following files:

fs/ntfs/ChangeLog | 9 +++
fs/ntfs/Makefile | 2
fs/ntfs/aops.c | 6 --
fs/ntfs/attraops.c | 1
fs/ntfs/file.c | 120 +----------------------------------------------------
fs/ntfs/mft.c | 9 ---
fs/ntfs/namei.c | 37 ----------------
fs/ntfs/ntfs.h | 9 ---
fs/ntfs/super.c | 32 +++++---------
9 files changed, 26 insertions(+), 199 deletions(-)

through these ChangeSets:

<aia21@cantab.net> (02/05/11 1.539)
NTFS 2.0.7 release: pure cleanups.

<aia21@cantab.net> (02/05/11 1.513.26.1)
NTFS 2.0.7: minor cleanup, remove NULL struct initializers

diff -Nru a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
--- a/fs/ntfs/ChangeLog Sat May 11 16:06:22 2002
+++ b/fs/ntfs/ChangeLog Sat May 11 16:06:22 2002
@@ -28,6 +28,10 @@

- Remove much of the NULL struct element initializers.
- Various updates to make compatible with recent kernels.
+ - Remove defines of MAX_BUF_PER_PAGE and include linux/buffer_head.h
+ in fs/ntfs/ntfs.h instead.
+ - Remove no longer needed KERNEL_VERSION checks. We are now in the
+ kernel proper so they are no longer needed.

2.0.6 - Major bugfix to make compatible with other kernel changes.

diff -Nru a/fs/ntfs/aops.c b/fs/ntfs/aops.c
--- a/fs/ntfs/aops.c Sat May 11 16:06:22 2002
+++ b/fs/ntfs/aops.c Sat May 11 16:06:22 2002
@@ -29,12 +29,6 @@

#include "ntfs.h"

-#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512)
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,8)
-#define page_buffers(page) (page)->buffers
-#endif
-
/**
* end_buffer_read_file_async -
*
diff -Nru a/fs/ntfs/mft.c b/fs/ntfs/mft.c
--- a/fs/ntfs/mft.c Sat May 11 16:06:22 2002
+++ b/fs/ntfs/mft.c Sat May 11 16:06:22 2002
@@ -25,8 +25,6 @@

#include "ntfs.h"

-#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512)
-
/**
* __format_mft_record - initialize an empty mft record
* @m: mapped, pinned and locked for writing mft record
diff -Nru a/fs/ntfs/ntfs.h b/fs/ntfs/ntfs.h
--- a/fs/ntfs/ntfs.h Sat May 11 16:06:22 2002
+++ b/fs/ntfs/ntfs.h Sat May 11 16:06:22 2002
@@ -26,14 +26,11 @@

#include <linux/version.h>

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,5)
-# error The NTFS driver requires at least kernel 2.5.5.
-#endif
-
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/compiler.h>
#include <linux/fs.h>
+#include <linux/buffer_head.h>
#include <linux/nls.h>
#include <linux/pagemap.h>
#include <linux/smp.h>
@@ -48,10 +45,6 @@
#include "layout.h"
#include "attrib.h"
#include "mft.h"
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-typedef long sector_t;
-#endif

typedef enum {
NTFS_BLOCK_SIZE = 512,
diff -Nru a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
--- a/fs/ntfs/ChangeLog Sat May 11 16:06:23 2002
+++ b/fs/ntfs/ChangeLog Sat May 11 16:06:23 2002
@@ -24,6 +24,11 @@
- Want to use dummy inodes for address space i/o. We need some VFS
changes first, which are currently under discussion.

+2.0.7 - Minor cleanups and updates for changes in core kernel code.
+
+ - Remove much of the NULL struct element initializers.
+ - Various updates to make compatible with recent kernels.
+
2.0.6 - Major bugfix to make compatible with other kernel changes.

- Initialize the mftbmp address space properly now that there are more
diff -Nru a/fs/ntfs/Makefile b/fs/ntfs/Makefile
--- a/fs/ntfs/Makefile Sat May 11 16:06:23 2002
+++ b/fs/ntfs/Makefile Sat May 11 16:06:23 2002
@@ -7,7 +7,7 @@

obj-m := $(O_TARGET)

-EXTRA_CFLAGS = -DNTFS_VERSION=\"2.0.6\"
+EXTRA_CFLAGS = -DNTFS_VERSION=\"2.0.7\"

ifeq ($(CONFIG_NTFS_DEBUG),y)
EXTRA_CFLAGS += -DDEBUG
diff -Nru a/fs/ntfs/attraops.c b/fs/ntfs/attraops.c
--- a/fs/ntfs/attraops.c Sat May 11 16:06:23 2002
+++ b/fs/ntfs/attraops.c Sat May 11 16:06:23 2002
@@ -43,6 +43,5 @@
disk request queue. */
prepare_write: NULL, /* . */
commit_write: NULL, /* . */
- //truncatepage: NULL, /* . */
};

diff -Nru a/fs/ntfs/file.c b/fs/ntfs/file.c
--- a/fs/ntfs/file.c Sat May 11 16:06:23 2002
+++ b/fs/ntfs/file.c Sat May 11 16:06:23 2002
@@ -24,127 +24,13 @@
struct file_operations ntfs_file_ops = {
llseek: generic_file_llseek, /* Seek inside file. */
read: generic_file_read, /* Read from file. */
- write: NULL, /* . */
- readdir: NULL, /* . */
- poll: NULL, /* . */
- ioctl: NULL, /* . */
mmap: generic_file_mmap, /* Mmap file. */
open: generic_file_open, /* Open file. */
- flush: NULL, /* . */
- release: NULL, /* . */
- fsync: NULL, /* . */
- fasync: NULL, /* . */
- lock: NULL, /* . */
- readv: NULL, /* . */
- writev: NULL, /* . */
- sendpage: NULL, /* . */
- get_unmapped_area: NULL, /* . */
};

-struct inode_operations ntfs_file_inode_ops = {
- create: NULL, /* . */
- lookup: NULL, /* . */
- link: NULL, /* . */
- unlink: NULL, /* . */
- symlink: NULL, /* . */
- mkdir: NULL, /* . */
- rmdir: NULL, /* . */
- mknod: NULL, /* . */
- rename: NULL, /* . */
- readlink: NULL, /* . */
- follow_link: NULL, /* . */
- truncate: NULL, /* . */
- permission: NULL, /* . */
- revalidate: NULL, /* . */
- setattr: NULL, /* . */
- getattr: NULL, /* . */
-};
-
-#if 0
-/* NOTE: read, write, poll, fsync, readv, writev can be called without the big
- * kernel lock held in all filesystems. */
-struct file_operations {
- struct module *owner;
- loff_t (*llseek) (struct file *, loff_t, int);
- ssize_t (*read) (struct file *, char *, size_t, loff_t *);
- ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
- int (*readdir) (struct file *, void *, filldir_t);
- unsigned int (*poll) (struct file *, struct poll_table_struct *);
- int (*ioctl) (struct inode *, struct file *, unsigned int,
- unsigned long);
- int (*mmap) (struct file *, struct vm_area_struct *);
- int (*flush) (struct file *);
- int (*release) (struct inode *, struct file *);
- int (*fsync) (struct file *, struct dentry *, int datasync);
- int (*fasync) (int, struct file *, int);
- int (*lock) (struct file *, int, struct file_lock *);
- ssize_t (*readv) (struct file *, const struct iovec *, unsigned long,
- loff_t *);
- ssize_t (*writev) (struct file *, const struct iovec *, unsigned long,
- loff_t *);
- ssize_t (*sendpage) (struct file *, struct page *, int, size_t,
- loff_t *, int);
- unsigned long (*get_unmapped_area)(struct file *, unsigned long,
- unsigned long, unsigned long, unsigned long);
-};
+struct inode_operations ntfs_file_inode_ops = {};

-struct inode_operations {
- int (*create) (struct inode *,struct dentry *,int);
- struct dentry * (*lookup) (struct inode *,struct dentry *);
- int (*link) (struct dentry *,struct inode *,struct dentry *);
- int (*unlink) (struct inode *,struct dentry *);
- int (*symlink) (struct inode *,struct dentry *,const char *);
- int (*mkdir) (struct inode *,struct dentry *,int);
- int (*rmdir) (struct inode *,struct dentry *);
- int (*mknod) (struct inode *,struct dentry *,int,int);
- int (*rename) (struct inode *, struct dentry *,
- struct inode *, struct dentry *);
- int (*readlink) (struct dentry *, char *,int);
- int (*follow_link) (struct dentry *, struct nameidata *);
- void (*truncate) (struct inode *);
- int (*permission) (struct inode *, int);
- int (*revalidate) (struct dentry *);
- int (*setattr) (struct dentry *, struct iattr *);
- int (*getattr) (struct dentry *, struct iattr *);
-};
-#endif
+struct file_operations ntfs_empty_file_ops = {};

-struct file_operations ntfs_empty_file_ops = {
- llseek: NULL, /* . */
- read: NULL, /* . */
- write: NULL, /* . */
- readdir: NULL, /* . */
- poll: NULL, /* . */
- ioctl: NULL, /* . */
- mmap: NULL, /* . */
- open: NULL, /* . */
- flush: NULL, /* . */
- release: NULL, /* . */
- fsync: NULL, /* . */
- fasync: NULL, /* . */
- lock: NULL, /* . */
- readv: NULL, /* . */
- writev: NULL, /* . */
- sendpage: NULL, /* . */
- get_unmapped_area: NULL, /* . */
-};
-
-struct inode_operations ntfs_empty_inode_ops = {
- create: NULL, /* . */
- lookup: NULL, /* . */
- link: NULL, /* . */
- unlink: NULL, /* . */
- symlink: NULL, /* . */
- mkdir: NULL, /* . */
- rmdir: NULL, /* . */
- mknod: NULL, /* . */
- rename: NULL, /* . */
- readlink: NULL, /* . */
- follow_link: NULL, /* . */
- truncate: NULL, /* . */
- permission: NULL, /* . */
- revalidate: NULL, /* . */
- setattr: NULL, /* . */
- getattr: NULL, /* . */
-};
+struct inode_operations ntfs_empty_inode_ops = {};

diff -Nru a/fs/ntfs/mft.c b/fs/ntfs/mft.c
--- a/fs/ntfs/mft.c Sat May 11 16:06:23 2002
+++ b/fs/ntfs/mft.c Sat May 11 16:06:23 2002
@@ -114,13 +114,6 @@
disk request queue. */
prepare_write: NULL, /* . */
commit_write: NULL, /* . */
- bmap: NULL, /* Needed for FIBMAP.
- Don't use it. */
- flushpage: NULL, /* . */
- releasepage: NULL, /* . */
-#ifdef KERNEL_HAS_O_DIRECT
- direct_IO: NULL, /* . */
-#endif
};

/**
diff -Nru a/fs/ntfs/namei.c b/fs/ntfs/namei.c
--- a/fs/ntfs/namei.c Sat May 11 16:06:23 2002
+++ b/fs/ntfs/namei.c Sat May 11 16:06:23 2002
@@ -103,43 +103,6 @@
}

struct inode_operations ntfs_dir_inode_ops = {
- create: NULL, /* . */
lookup: ntfs_lookup, /* lookup directory. */
- link: NULL, /* . */
- unlink: NULL, /* . */
- symlink: NULL, /* . */
- mkdir: NULL, /* . */
- rmdir: NULL, /* . */
- mknod: NULL, /* . */
- rename: NULL, /* . */
- readlink: NULL, /* . */
- follow_link: NULL, /* . */
- truncate: NULL, /* . */
- permission: NULL, /* . */
- revalidate: NULL, /* . */
- setattr: NULL, /* . */
- getattr: NULL, /* . */
};
-
-#if 0
-struct inode_operations {
- int (*create) (struct inode *,struct dentry *,int);
- struct dentry * (*lookup) (struct inode *,struct dentry *);
- int (*link) (struct dentry *,struct inode *,struct dentry *);
- int (*unlink) (struct inode *,struct dentry *);
- int (*symlink) (struct inode *,struct dentry *,const char *);
- int (*mkdir) (struct inode *,struct dentry *,int);
- int (*rmdir) (struct inode *,struct dentry *);
- int (*mknod) (struct inode *,struct dentry *,int,int);
- int (*rename) (struct inode *, struct dentry *,
- struct inode *, struct dentry *);
- int (*readlink) (struct dentry *, char *,int);
- int (*follow_link) (struct dentry *, struct nameidata *);
- void (*truncate) (struct inode *);
- int (*permission) (struct inode *, int);
- int (*revalidate) (struct dentry *);
- int (*setattr) (struct dentry *, struct iattr *);
- int (*getattr) (struct dentry *, struct iattr *);
-};
-#endif

diff -Nru a/fs/ntfs/super.c b/fs/ntfs/super.c
--- a/fs/ntfs/super.c Sat May 11 16:06:23 2002
+++ b/fs/ntfs/super.c Sat May 11 16:06:23 2002
@@ -1424,31 +1424,23 @@
called from iget(). */
dirty_inode: ntfs_dirty_inode, /* VFS: Called from
__mark_inode_dirty(). */
- write_inode: NULL, /* VFS: Write dirty inode to disk. */
- put_inode: NULL, /* VFS: Called whenever the reference
- count (i_count) of the inode is
- going to be decreased but before the
- actual decrease. */
- delete_inode: NULL, /* VFS: Delete inode from disk. Called
- when i_count becomes 0 and i_nlink is
- also 0. */
+ //write_inode: NULL, /* VFS: Write dirty inode to disk. */
+ //put_inode: NULL, /* VFS: Called whenever the reference
+ // count (i_count) of the inode is
+ // going to be decreased but before the
+ // actual decrease. */
+ //delete_inode: NULL, /* VFS: Delete inode from disk. Called
+ // when i_count becomes 0 and i_nlink is
+ // also 0. */
put_super: ntfs_put_super, /* Syscall: umount. */
- write_super: NULL, /* Flush dirty super block to disk. */
- write_super_lockfs: NULL, /* ? */
- unlockfs: NULL, /* ? */
+ //write_super: NULL, /* Flush dirty super block to disk. */
+ //write_super_lockfs: NULL, /* ? */
+ //unlockfs: NULL, /* ? */
statfs: ntfs_statfs, /* Syscall: statfs */
remount_fs: ntfs_remount, /* Syscall: mount -o remount. */
clear_inode: ntfs_clear_big_inode, /* VFS: Called when an inode is
removed from memory. */
- umount_begin: NULL, /* Forced umount. */
- /*
- * These are NFSd support functions but NTFS is a standard fs so
- * shouldn't need to implement these manually. At least we can try
- * without and if it doesn't work in some way we can always implement
- * something here.
- */
- fh_to_dentry: NULL, /* Get dentry for given file handle. */
- dentry_to_fh: NULL, /* Get file handle for given dentry. */
+ //umount_begin: NULL, /* Forced umount. */
show_options: ntfs_show_options, /* Show mount options in proc. */
};

Best regards,

Anton

-- 
Anton Altaparmakov <aia21 at cantab.net> (replace at with @)
Linux NTFS maintainer / IRC: #ntfs on irc.openprojects.net
WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/

===================================================================

This BitKeeper patch contains the following changesets: aia21@cantab.net|ChangeSet|20020511140008|01977 aia21@cantab.net|ChangeSet|20020511112351|01997 aia21@cantab.net|ChangeSet|20020511110827|41648 ## Wrapped with gzip_uu ##

begin 664 bkpatch17542 M'XL(`&\SW3P``\5:6U/;2!9^MGY%U^1E=V:0^Z:;=YF%!)*E`AF*#)EY2)6K M+;6P"EMRZ0*36>U_W]/=LF/)%HE=F(64`4G=I\_YSOG.17F%+LY&@S++'\0L M*DY$.9UEJ5WF(BWFLA1VF,WK-U.1WLF/LJPIQA2^'>(Q[+@U<3'WZI!$A`A. M9(0I]UUNO4*WA<Q'`Y$(2N"O?V=%.1J$(BW%Q$YE"9=NL@PN#:LB'Q9Y."S3 M.PNN7HLRG*('F1>C`;'9ZDKY92%'@YOS=[>7IS>6=7R,5D="Q\?6\YY>G_KD MZVF[&SC8)1B[#JM90+ECG2%B.X39U+4)PG2(G2$AB-`1]D?4^PF3$<:HNRGZ MR4-'V'J-G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'&./P<#(>/ M>5(VQ=YHH"9=/P\&PQ_1)_6BXW=U#T5)7GXQE9KRQ2@I[FWTXU`M7E1ES](W M8C8#WWN<RE0^@.^J.5H.M7LNTU"JI0/X0@B%6966Z&_)6/_R]^7(S4A+BK4G M[S)%1W"`B9KYA+F:RRM:*N%"K&9Y>MRR>ER$904LMGQR>>)(SF2OOF?Z9B,\ MSK-YHZQ19FUSI19JS@SB`759(&S&3>,4_/Z^?78Q*S*$]1D``N8BIB'PX><* M`HWJ^I'>SJIBVEA?WT2361;>=S%86SU6]^-BN0GL\:_FH2IMWUK=@^-PU1S` M<8!'B7YVKM0:3^1=DK;.D^4A6-S<UM*M5":SR4D(YJW2XM&64;6>##LOB#!Q M&:$J&[+FK5[@=5_J\>#EV]_>UWG?]8)X&:M;WNI]U_I#Q#@T>N3K_R@QP\EJ 2?BQ#UYF$CF/]#^,JRQWW(@`` ` end - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/