[PATCH-2.3.99-pre4-5] NTFS write support

From: Anton Altaparmakov (aia21@cus.cam.ac.uk)
Date: Sun Apr 09 2000 - 21:51:41 EST


Since there is no maintainer for the NTFS driver I am sending this
directly to you, Linus, as well as to the LKML.

This pathc fixes the compilation issue with NTFS write support, which
appeared somewhere along 2.3.x, I can't remember and I kept fixing it for
myself so I thought it might be a good idea to post this now that other
people are trying to use it as well).

Be warned: write support is VERY DANGEROUS as it is! - Keep a backup or
you _will_ get bitten (even if it is just by Murphy's Law...). - You have
been warned!

Also you will notice that I inserted myself in the MAINTAINERS file under
a new "NTFS FILESYSTEM" section with Status: Odd Fixes. - Since nobody
else seems to want to do it I will take it up unless you disagree, but I
have extremely limited spare time (don't we all...) so I can't do any more
than "Odd Fixes" at present. - If anyone with more time wants to take over
please feel free to do so... - In the meantime I will do my best to keep
the driver in a state where it at least compiles and if time allows
where it works, too.

The current status (according to my personal testing) is that read-only
works without any problems while write support works except for deleting
files, which doesn't work at all (files don't get deleted).

Regards,

        Anton

-- 

Anton Altaparmakov Phone: +44-(0)1223-333541 (lab) Christ's College eMail: AntonA@bigfoot.com Cambridge CB2 3BU WWW: http://www-stu.christs.cam.ac.uk/~aia21/ United Kingdom ICQ: 8561279

diff -ur linux-2.3.99-pre4-5/Documentation/Configure.help linux/Documentation/Configure.help --- linux-2.3.99-pre4-5/Documentation/Configure.help Mon Apr 10 00:06:18 2000 +++ linux/Documentation/Configure.help Mon Apr 10 02:07:31 2000 @@ -10263,11 +10263,13 @@ NTFS write support (DANGEROUS) CONFIG_NTFS_RW - If you say Y here, you will (hopefully) be able to write to NTFS - file systems as well as read from them. The read-write support - in NTFS is far from being complete and is not well tested. If you + If you say Y here, you will (maybe) be able to write to NTFS file + systems as well as read from them. The read-write support in + NTFS is far from being complete and is not well tested. If you enable this, back up your NTFS volume first since it may get - damaged. + damaged. Also, make sure to run chkdsk from within Microsoft + Windows NT after having performed any writes to a NTFS partition + from Linux to detect any problems as early as possible. If unsure, say N. diff -ur linux-2.3.99-pre4-5/Documentation/filesystems/ntfs.txt linux/Documentation/filesystems/ntfs.txt --- linux-2.3.99-pre4-5/Documentation/filesystems/ntfs.txt Tue Apr 28 22:22:04 1998 +++ linux/Documentation/filesystems/ntfs.txt Mon Apr 10 02:36:57 2000 @@ -4,10 +4,13 @@ To mount an NTFS volume, use the filesystem type 'ntfs'. The driver currently works only in read-only mode, with no fault-tolerance supported. If you enable the experimental write support, make sure -you can recover from a complete loss of data. For ftdisk support, -limited success was reported with volume sets on top of the md driver, -although mirror and stripe sets should work as well - if the md -driver can be talked into using the same layout as Windows NT. +you can recover from a complete loss of data and also always run +chkdsk from within Microsoft Windows NT after performing a write to +a NTFS partition from Linux to detect any problems as early as +possible. For ftdisk support, limited success was reported with +volume sets on top of the md driver, although mirror and stripe +sets should work as well - if the md driver can be talked into +using the same layout as Windows NT. The ntfs driver supports the following mount options: iocharset=name Character set to use when returning file names. diff -ur linux-2.3.99-pre4-5/MAINTAINERS linux/MAINTAINERS --- linux-2.3.99-pre4-5/MAINTAINERS Mon Apr 10 00:06:18 2000 +++ linux/MAINTAINERS Mon Apr 10 02:34:26 2000 @@ -740,6 +740,12 @@ L: linux-kernel@vger.rutgers.edu S: Maintained +NTFS FILESYSTEM +P: Anton Altaparmakov +M: aia21@cus.cam.ac.uk +L: linux-kernel@vger.rutgers.edu +S: Odd Fixes + NVIDIA (RIVA) FRAMEBUFFER DRIVER P: Jeff Garzik M: jgarzik@mandrakesoft.com diff -ur linux-2.3.99-pre4-5/fs/ntfs/Makefile linux/fs/ntfs/Makefile --- linux-2.3.99-pre4-5/fs/ntfs/Makefile Mon Apr 12 18:05:58 1999 +++ linux/fs/ntfs/Makefile Mon Apr 10 01:56:01 2000 @@ -3,7 +3,7 @@ O_TARGET := ntfs.o O_OBJS := fs.o sysctl.o support.o util.o inode.o dir.o super.o attr.o M_OBJS := $(O_TARGET) -EXTRA_CFLAGS = -DNTFS_IN_LINUX_KERNEL -DNTFS_VERSION=\"990411\" +EXTRA_CFLAGS = -DNTFS_IN_LINUX_KERNEL -DNTFS_VERSION=\"000410\" include $(TOPDIR)/Rules.make diff -ur linux-2.3.99-pre4-5/fs/ntfs/fs.c linux/fs/ntfs/fs.c --- linux-2.3.99-pre4-5/fs/ntfs/fs.c Tue Mar 21 19:30:08 2000 +++ linux/fs/ntfs/fs.c Mon Apr 10 02:38:06 2000 @@ -1,7 +1,8 @@ /* * fs.c - * NTFS driver for Linux 2.1 + * NTFS driver for Linux 2.3.x * + * Copyright (C) 2000, Anton Altaparmakov * Copyright (C) 1995-1997, 1999 Martin von Löwis * Copyright (C) 1996 Richard Russon * Copyright (C) 1996-1997 Régis Duchesne @@ -53,7 +54,6 @@ { struct ntfs_getuser_update_vm_s *p = src->param; copy_from_user (dest, p->user, len); - update_vm_cache (p->ino, p->off, dest, len); p->user += len; p->off += len; }

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:13 EST