From d41cc702cc4ba3782ebe3b2e189633607d5ccd6a Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Mon, 30 Jan 2006 08:53:33 +0000 Subject: [GFS2] Export file_ra_state_init Export file_ra_state_init so that its possible to use the already exported functions which require a struct ra_state as an argument from a module. Signed-off-by: Steven Whitehouse --- mm/readahead.c | 1 + 1 file changed, 1 insertion(+) (limited to 'mm') diff --git a/mm/readahead.c b/mm/readahead.c index 8d6eeaa..9f0b982 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -38,6 +38,7 @@ file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping) ra->ra_pages = mapping->backing_dev_info->ra_pages; ra->prev_page = -1; } +EXPORT_SYMBOL_GPL(file_ra_state_init); /* * Return max readahead size for this inode in number-of-pages. -- cgit v1.1 From c25ec8f5684cb3c5dde6a67c1bbc33a449eefbe2 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Mon, 30 Jan 2006 08:57:31 +0000 Subject: [GFS2] Export file_read_actor Export file_read_actor so that it can be used from modules since functions which take this function as an argument are already exported. Signed-off-by: Steven Whitehouse --- mm/filemap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'mm') diff --git a/mm/filemap.c b/mm/filemap.c index 44da3d4..7624c26 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -981,6 +981,7 @@ success: desc->arg.buf += size; return size; } +EXPORT_SYMBOL(file_read_actor); /* * This is the "read()" routine for all filesystems -- cgit v1.1 From bf9f424d9acf461fabcb0e9f47b356e08186d91f Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 21 Jun 2006 11:54:43 -0400 Subject: [GFS2] Make file_read_actor export _GPL Make file_read_actor export a _GPL export. Signed-off-by: Steven Whitehouse --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mm') diff --git a/mm/filemap.c b/mm/filemap.c index 82c4488..a02a0b2 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1044,7 +1044,7 @@ success: desc->arg.buf += size; return size; } -EXPORT_SYMBOL(file_read_actor); +EXPORT_SYMBOL_GPL(file_read_actor); /* * This is the "read()" routine for all filesystems -- cgit v1.1 From a9e5f4d0780ec9cda7a70b08294d7718431b62a1 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Tue, 25 Jul 2006 17:24:12 -0400 Subject: [GFS2] Alter direct I/O path As per comments received, alter the GFS2 direct I/O path so that it uses the standard read functions "out of the box". Needs a small change to one of the VFS functions. This reduces the size of the code quite a lot and also removes the need for one new export. Some more work remains to be done, but this is the bones of the thing. Signed-off-by: Steven Whitehouse --- mm/filemap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mm') diff --git a/mm/filemap.c b/mm/filemap.c index b9c91ab..a92d690 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1122,7 +1122,6 @@ success: desc->arg.buf += size; return size; } -EXPORT_SYMBOL_GPL(file_read_actor); /** * __generic_file_aio_read - generic filesystem read routine @@ -1184,7 +1183,8 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, *ppos = pos + retval; } file_accessed(filp); - goto out; + if (retval != 0) + goto out; } retval = 0; -- cgit v1.1 From 0e0bcae3bfb3c88dbe14735fa69d7d88794dc73a Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 27 Sep 2006 14:45:07 -0400 Subject: [GFS2] Fix direct i/o logic in filemap.c We shouldn't mark the file accessed in the case that it wasn't accessed. Signed-off-by: Steven Whitehouse --- mm/filemap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mm') diff --git a/mm/filemap.c b/mm/filemap.c index d9bbea1..91a741d 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1180,9 +1180,10 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, if (retval > 0) *ppos = pos + retval; } - file_accessed(filp); - if (retval != 0) + if (likely(retval != 0)) { + file_accessed(flip); goto out; + } } retval = 0; -- cgit v1.1 From 3f1a9aaeffd8d1cbc5ab9776c45cbd66af1c9699 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 27 Sep 2006 14:52:48 -0400 Subject: [GFS2] Fix typo in last patch Signed-off-by: Steven Whitehouse --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mm') diff --git a/mm/filemap.c b/mm/filemap.c index 91a741d..3195806 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1181,7 +1181,7 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, *ppos = pos + retval; } if (likely(retval != 0)) { - file_accessed(flip); + file_accessed(filp); goto out; } } -- cgit v1.1