* [PATCH 1/1] fix 2.6.24-rc1 nfs_file_mmap change for NOMMU
@ 2007-12-09 18:52 Berkhan, Enrik (GE Infra, Oil & Gas)
2007-12-12 2:40 ` Trond Myklebust
0 siblings, 1 reply; 4+ messages in thread
From: Berkhan, Enrik (GE Infra, Oil & Gas) @ 2007-12-09 18:52 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-kernel
- generic_file_mmap returns -ENOSYS for NOMMU systems; replicate this
behaviour
Signed-off-by: Enrik Berkhan <Enrik.Berkhan@ge.com>
---
fs/nfs/file.c | 4 ++++
1 files changed, 4 insertions(+)
Index: fs/nfs/file.c
===================================================================
--- fs/nfs/file.c.orig 2007-12-05 09:48:59.000000000 +0100
+++ fs/nfs/file.c 2007-12-05 09:49:56.000000000 +0100
@@ -283,7 +283,11 @@ nfs_file_mmap(struct file * file, struct
if (!status) {
vma->vm_ops = &nfs_file_vm_ops;
vma->vm_flags |= VM_CAN_NONLINEAR;
+#ifdef CONFIG_MMU
file_accessed(file);
+#else
+ return -ENOSYS;
+#endif
}
return status;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] fix 2.6.24-rc1 nfs_file_mmap change for NOMMU
2007-12-09 18:52 [PATCH 1/1] fix 2.6.24-rc1 nfs_file_mmap change for NOMMU Berkhan, Enrik (GE Infra, Oil & Gas)
@ 2007-12-12 2:40 ` Trond Myklebust
2007-12-12 7:29 ` Berkhan, Enrik (GE Infra, Oil & Gas)
0 siblings, 1 reply; 4+ messages in thread
From: Trond Myklebust @ 2007-12-12 2:40 UTC (permalink / raw)
To: Berkhan, Enrik (GE Infra, Oil & Gas); +Cc: linux-kernel
On Sun, 2007-12-09 at 19:52 +0100, Berkhan, Enrik (GE Infra, Oil & Gas)
wrote:
> - generic_file_mmap returns -ENOSYS for NOMMU systems; replicate this
> behaviour
>
> Signed-off-by: Enrik Berkhan <Enrik.Berkhan@ge.com>
> ---
> fs/nfs/file.c | 4 ++++
> 1 files changed, 4 insertions(+)
>
> Index: fs/nfs/file.c
> ===================================================================
> --- fs/nfs/file.c.orig 2007-12-05 09:48:59.000000000 +0100
> +++ fs/nfs/file.c 2007-12-05 09:49:56.000000000 +0100
> @@ -283,7 +283,11 @@ nfs_file_mmap(struct file * file, struct
> if (!status) {
> vma->vm_ops = &nfs_file_vm_ops;
> vma->vm_flags |= VM_CAN_NONLINEAR;
> +#ifdef CONFIG_MMU
> file_accessed(file);
> +#else
> + return -ENOSYS;
> +#endif
> }
> return status;
> }
Why do that after going through the process of revalidating the inode
etc.? Just replace nfs_file_mmap() with a function returning ENOSYS in
the case of CONFIG_MMU.
Better still, in the case of CONFIG_MMU, instead of having an
nfs_file_mmap(), just replace the .mmap field in nfs_file_operations
with a call to generic_file_mmap().
Trond
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] fix 2.6.24-rc1 nfs_file_mmap change for NOMMU
2007-12-12 2:40 ` Trond Myklebust
@ 2007-12-12 7:29 ` Berkhan, Enrik (GE Infra, Oil & Gas)
2007-12-12 20:03 ` Trond Myklebust
0 siblings, 1 reply; 4+ messages in thread
From: Berkhan, Enrik (GE Infra, Oil & Gas) @ 2007-12-12 7:29 UTC (permalink / raw)
To: Trond Myklebust; +Cc: linux-kernel
Trond Myklebust wrote:
> On Sun, 2007-12-09 at 19:52 +0100, Berkhan, Enrik (GE Infra, Oil & Gas)
> wrote:
>> - generic_file_mmap returns -ENOSYS for NOMMU systems; replicate this
>> behaviour
>
> Why do that after going through the process of revalidating the inode
> etc.? Just replace nfs_file_mmap() with a function returning ENOSYS in
> the case of CONFIG_MMU.
>
> Better still, in the case of CONFIG_MMU, instead of having an
> nfs_file_mmap(), just replace the .mmap field in nfs_file_operations
> with a call to generic_file_mmap().
I just tried to make it work without really knowing what I do :)
I have mailed another patch implementing your second suggestion (the system
still boots with nfsroot).
Enrik
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] fix 2.6.24-rc1 nfs_file_mmap change for NOMMU
2007-12-12 7:29 ` Berkhan, Enrik (GE Infra, Oil & Gas)
@ 2007-12-12 20:03 ` Trond Myklebust
0 siblings, 0 replies; 4+ messages in thread
From: Trond Myklebust @ 2007-12-12 20:03 UTC (permalink / raw)
To: Berkhan, Enrik (GE Infra, Oil & Gas); +Cc: linux-kernel
On Wed, 2007-12-12 at 08:29 +0100, Berkhan, Enrik (GE Infra, Oil & Gas)
wrote:
> Trond Myklebust wrote:
> > On Sun, 2007-12-09 at 19:52 +0100, Berkhan, Enrik (GE Infra, Oil & Gas)
> > wrote:
> >> - generic_file_mmap returns -ENOSYS for NOMMU systems; replicate this
> >> behaviour
> >
> > Why do that after going through the process of revalidating the inode
> > etc.? Just replace nfs_file_mmap() with a function returning ENOSYS in
> > the case of CONFIG_MMU.
> >
> > Better still, in the case of CONFIG_MMU, instead of having an
> > nfs_file_mmap(), just replace the .mmap field in nfs_file_operations
> > with a call to generic_file_mmap().
>
> I just tried to make it work without really knowing what I do :)
>
> I have mailed another patch implementing your second suggestion (the system
> still boots with nfsroot).
Thanks. That patch looks better. I have 2 questions, though:
1. Is this urgent enough to warrant pushing into 2.6.24?
2. Are there any filesystems which support mmap() on !CONFIG_MMU?
Cheers
Trond
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-12-12 20:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-09 18:52 [PATCH 1/1] fix 2.6.24-rc1 nfs_file_mmap change for NOMMU Berkhan, Enrik (GE Infra, Oil & Gas)
2007-12-12 2:40 ` Trond Myklebust
2007-12-12 7:29 ` Berkhan, Enrik (GE Infra, Oil & Gas)
2007-12-12 20:03 ` Trond Myklebust
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®