Patchwork [3/3] add mmap for direct,nobrl

login
register
mail settings
Submitter piastry@etersoft.ru
Date March 24, 2010, 8:57 a.m.
Message ID <201003241157.49062.piastry@etersoft.ru>
Download mbox | patch
Permalink /patch/48386/
State New
Headers show

Comments

piastry@etersoft.ru - March 24, 2010, 8:57 a.m.
Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
Jeff Layton - March 24, 2010, 7:26 p.m.
On Wed, 24 Mar 2010 11:57:48 +0300
piastry@etersoft.ru wrote:

> diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> index 5183bc2..ded66be 100644
> --- a/fs/cifs/cifsfs.c
> +++ b/fs/cifs/cifsfs.c
> @@ -808,6 +808,7 @@ const struct file_operations cifs_file_direct_nobrl_ops = {
>  	.release = cifs_close,
>  	.fsync = cifs_fsync,
>  	.flush = cifs_flush,
> +	.mmap = cifs_file_mmap,
>  	.splice_read = generic_file_splice_read,
>  #ifdef CONFIG_CIFS_POSIX
>  	.unlocked_ioctl  = cifs_ioctl,
> 
>  Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
> _______________________________________________
> linux-cifs-client mailing list
> linux-cifs-client@lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux-cifs-client
> 

Patch is pretty straightforward, but a description of what this fixes
is still needed.
piastry@etersoft.ru - March 25, 2010, 7:31 a.m.
В сообщении от 25 марта 2010 09:56:50 вы написали:
> В сообщении от 24 марта 2010 22:26:41 вы написали:
> > On Wed, 24 Mar 2010 11:57:48 +0300
> >
> > 
> >
> > piastry@etersoft.ru wrote:
> > > diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> > > index 5183bc2..ded66be 100644
> > > --- a/fs/cifs/cifsfs.c
> > > +++ b/fs/cifs/cifsfs.c
> > > @@ -808,6 +808,7 @@ const struct file_operations
> > > cifs_file_direct_nobrl_ops = {
> > >
> > > 
> > >     .release = cifs_close,
> > >     .fsync = cifs_fsync,
> > >     .flush = cifs_flush,
> > > 
> > >
> > > +   .mmap = cifs_file_mmap,
> > >
> > > 
> > >     .splice_read = generic_file_splice_read,
> > >  
> > >  #ifdef CONFIG_CIFS_POSIX
> > >  
> > >     .unlocked_ioctl  = cifs_ioctl,
> > >  
> > >  Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
> > > 
> > >
> > > _______________________________________________
> > > linux-cifs-client mailing list
> > > linux-cifs-client@lists.samba.org
> > > https://lists.samba.org/mailman/listinfo/linux-cifs-client
> >
> > 
> >
> > Patch is pretty straightforward, but a description of what this fixes
> > is still needed.
> 
> OK, without mmap functions in file_ops OpenOffice can't save changes in
> existing document. The same situation you can see with gedit. Also, a.out
> format of files can't be executed without mmap.
> 
> --
> Best regards,
> Pavel Shilovsky.

--
Best regards,
Pavel Shilovsky.
Jeff Layton - March 27, 2010, 1:58 a.m.
On Wed, 24 Mar 2010 11:57:48 +0300
piastry@etersoft.ru wrote:

> diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> index 5183bc2..ded66be 100644
> --- a/fs/cifs/cifsfs.c
> +++ b/fs/cifs/cifsfs.c
> @@ -808,6 +808,7 @@ const struct file_operations cifs_file_direct_nobrl_ops = {
>  	.release = cifs_close,
>  	.fsync = cifs_fsync,
>  	.flush = cifs_flush,
> +	.mmap = cifs_file_mmap,
>  	.splice_read = generic_file_splice_read,
>  #ifdef CONFIG_CIFS_POSIX
>  	.unlocked_ioctl  = cifs_ioctl,

Seems reasonable...

Reviewed-by: Jeff Layton <jlayton@samba.org>

Patch

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 5183bc2..ded66be 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -808,6 +808,7 @@  const struct file_operations cifs_file_direct_nobrl_ops = {
 	.release = cifs_close,
 	.fsync = cifs_fsync,
 	.flush = cifs_flush,
+	.mmap = cifs_file_mmap,
 	.splice_read = generic_file_splice_read,
 #ifdef CONFIG_CIFS_POSIX
 	.unlocked_ioctl  = cifs_ioctl,