Commit d629b96b authored by Anton Altaparmakov's avatar Anton Altaparmakov

NTFS: Add support for readv/writev and aio_read/aio_write.

Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
parent afb7238d
...@@ -26,6 +26,12 @@ ToDo/Notes: ...@@ -26,6 +26,12 @@ ToDo/Notes:
- Enable the code for setting the NT4 compatibility flag when we start - Enable the code for setting the NT4 compatibility flag when we start
making NTFS 1.2 specific modifications. making NTFS 1.2 specific modifications.
2.1.16 - WIP.
- Add support for readv/writev and aio_read/aio_write (fs/ntfs/file.c).
This is done by setting the appropriate file operations pointers to
the generic helper functions provided by mm/filemap.c.
2.1.15 - Invalidate quotas when (re)mounting read-write. 2.1.15 - Invalidate quotas when (re)mounting read-write.
- Add new element itype.index.collation_rule to the ntfs inode - Add new element itype.index.collation_rule to the ntfs inode
......
...@@ -6,7 +6,7 @@ ntfs-objs := aops.o attrib.o collate.o compress.o debug.o dir.o file.o \ ...@@ -6,7 +6,7 @@ ntfs-objs := aops.o attrib.o collate.o compress.o debug.o dir.o file.o \
index.o inode.o mft.o mst.o namei.o super.o sysctl.o unistr.o \ index.o inode.o mft.o mst.o namei.o super.o sysctl.o unistr.o \
upcase.o upcase.o
EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.15\" EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.16-WIP\"
ifeq ($(CONFIG_NTFS_DEBUG),y) ifeq ($(CONFIG_NTFS_DEBUG),y)
EXTRA_CFLAGS += -DDEBUG EXTRA_CFLAGS += -DDEBUG
......
...@@ -49,25 +49,48 @@ static int ntfs_file_open(struct inode *vi, struct file *filp) ...@@ -49,25 +49,48 @@ static int ntfs_file_open(struct inode *vi, struct file *filp)
} }
struct file_operations ntfs_file_ops = { struct file_operations ntfs_file_ops = {
.llseek = generic_file_llseek, /* Seek inside file. */ .llseek = generic_file_llseek, /* Seek inside file. */
.read = generic_file_read, /* Read from file. */ .read = generic_file_read, /* Read from file. */
.aio_read = generic_file_aio_read, /* Async read from file. */
.readv = generic_file_readv, /* Read from file. */
#ifdef NTFS_RW #ifdef NTFS_RW
.write = generic_file_write, /* Write to a file. */ .write = generic_file_write, /* Write to file. */
#endif .aio_write = generic_file_aio_write, /* Async write to file. */
.mmap = generic_file_mmap, /* Mmap file. */ .writev = generic_file_writev, /* Write to file. */
.sendfile = generic_file_sendfile,/* Zero-copy data send with the /*.release = ,*/ /* Last file is closed. See
data source being on the fs/ext2/file.c::
ntfs partition. We don't ext2_release_file() for
need to care about the data how to use this to discard
destination. */ preallocated space for
.open = ntfs_file_open, /* Open file. */ write opened files. */
/*.fsync = ,*/ /* Sync a file to disk. See
fs/buffer.c::sys_fsync()
and file_fsync(). */
/*.aio_fsync = ,*/ /* Sync all outstanding async
i/o operations on a
kiocb. */
#endif /* NTFS_RW */
/*.ioctl = ,*/ /* Perform function on the
mounted filesystem. */
.mmap = generic_file_mmap, /* Mmap file. */
.open = ntfs_file_open, /* Open file. */
.sendfile = generic_file_sendfile, /* Zero-copy data send with
the data source being on
the ntfs partition. We
do not need to care about
the data destination. */
/*.sendpage = ,*/ /* Zero-copy data send with
the data destination being
on the ntfs partition. We
do not need to care about
the data source. */
}; };
struct inode_operations ntfs_file_inode_ops = { struct inode_operations ntfs_file_inode_ops = {
#ifdef NTFS_RW #ifdef NTFS_RW
.truncate = ntfs_truncate, .truncate = ntfs_truncate,
.setattr = ntfs_setattr, .setattr = ntfs_setattr,
#endif #endif /* NTFS_RW */
}; };
struct file_operations ntfs_empty_file_ops = {}; struct file_operations ntfs_empty_file_ops = {};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment