shirishpargaonkar | 26 Jul 2012 00:45
Picon

[PATCH v2] cifs: obtain file access during backup intent lookup

From: Shirish Pargaonkar <shirishpargaonkar@...>

path based querries can fail for lack of access, especially during lookup
during open.
open itself would actually succeed becasue of back up intent bit
but querries (either path or file handle based) do not have a means to
specifiy backup intent bit.
So querry the file info during lookup using 
 trans2 / findfirst2 / file_id_full_ir_info
to obtain file info as well as file_id/inode value.

Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@...>
Reported-by: Tushar Gosavi <tugosavi@...>
---
 fs/cifs/cifssmb.c |   38 +++++++++++++++++------------
 fs/cifs/inode.c   |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 87 insertions(+), 18 deletions(-)

diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 4ee522b..f059c0a 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
 <at>  <at>  -4257,7 +4257,7  <at>  <at>  CIFSFindFirst(const int xid, struct cifs_tcon *tcon,
 	int rc = 0;
 	int bytes_returned = 0;
 	int name_len;
-	__u16 params, byte_count;
+	__u16 params, byte_count, ffattrs;

 	cFYI(1, "In FindFirst for %s", searchName);
(Continue reading)

Jeff Layton | 30 Jul 2012 13:00
Picon
Favicon

Re: [PATCH v2] cifs: obtain file access during backup intent lookup

On Wed, 25 Jul 2012 17:45:04 -0500
shirishpargaonkar@... wrote:

> From: Shirish Pargaonkar <shirishpargaonkar@...>
> 
> path based querries can fail for lack of access, especially during lookup
> during open.
> open itself would actually succeed becasue of back up intent bit
> but querries (either path or file handle based) do not have a means to
> specifiy backup intent bit.
> So querry the file info during lookup using 
>  trans2 / findfirst2 / file_id_full_ir_info
> to obtain file info as well as file_id/inode value.
> 
> Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@...>
> Reported-by: Tushar Gosavi <tugosavi@...>
> ---
>  fs/cifs/cifssmb.c |   38 +++++++++++++++++------------
>  fs/cifs/inode.c   |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++-
>  2 files changed, 87 insertions(+), 18 deletions(-)
> 
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index 4ee522b..f059c0a 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
>  <at>  <at>  -4257,7 +4257,7  <at>  <at>  CIFSFindFirst(const int xid, struct cifs_tcon *tcon,
>  	int rc = 0;
>  	int bytes_returned = 0;
>  	int name_len;
> -	__u16 params, byte_count;
(Continue reading)

Shirish Pargaonkar | 2 Aug 2012 08:07
Picon

Re: [PATCH v2] cifs: obtain file access during backup intent lookup

On Mon, Jul 30, 2012 at 6:00 AM, Jeff Layton <jlayton@...> wrote:
> On Wed, 25 Jul 2012 17:45:04 -0500
> shirishpargaonkar@... wrote:
>
>> From: Shirish Pargaonkar <shirishpargaonkar@...>
>>
>> path based querries can fail for lack of access, especially during lookup
>> during open.
>> open itself would actually succeed becasue of back up intent bit
>> but querries (either path or file handle based) do not have a means to
>> specifiy backup intent bit.
>> So querry the file info during lookup using
>>  trans2 / findfirst2 / file_id_full_ir_info
>> to obtain file info as well as file_id/inode value.
>>
>> Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@...>
>> Reported-by: Tushar Gosavi <tugosavi@...>
>> ---
>>  fs/cifs/cifssmb.c |   38 +++++++++++++++++------------
>>  fs/cifs/inode.c   |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++-
>>  2 files changed, 87 insertions(+), 18 deletions(-)
>>
>> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
>> index 4ee522b..f059c0a 100644
>> --- a/fs/cifs/cifssmb.c
>> +++ b/fs/cifs/cifssmb.c
>>  <at>  <at>  -4257,7 +4257,7  <at>  <at>  CIFSFindFirst(const int xid, struct cifs_tcon *tcon,
>>       int rc = 0;
>>       int bytes_returned = 0;
>>       int name_len;
(Continue reading)

Jeff Layton | 2 Aug 2012 16:37
Picon
Favicon

Re: [PATCH v2] cifs: obtain file access during backup intent lookup

On Thu, 2 Aug 2012 01:07:45 -0500
Shirish Pargaonkar <shirishpargaonkar@...> wrote:

> On Mon, Jul 30, 2012 at 6:00 AM, Jeff Layton <jlayton@...> wrote:
> > On Wed, 25 Jul 2012 17:45:04 -0500
> > shirishpargaonkar@... wrote:
> >
> >> From: Shirish Pargaonkar <shirishpargaonkar@...>
> >>
> >> path based querries can fail for lack of access, especially during lookup
> >> during open.
> >> open itself would actually succeed becasue of back up intent bit
> >> but querries (either path or file handle based) do not have a means to
> >> specifiy backup intent bit.
> >> So querry the file info during lookup using
> >>  trans2 / findfirst2 / file_id_full_ir_info
> >> to obtain file info as well as file_id/inode value.
> >>
> >> Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@...>
> >> Reported-by: Tushar Gosavi <tugosavi@...>
> >> ---
> >>  fs/cifs/cifssmb.c |   38 +++++++++++++++++------------
> >>  fs/cifs/inode.c   |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++-
> >>  2 files changed, 87 insertions(+), 18 deletions(-)
> >>
> >> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> >> index 4ee522b..f059c0a 100644
> >> --- a/fs/cifs/cifssmb.c
> >> +++ b/fs/cifs/cifssmb.c
> >>  <at>  <at>  -4257,7 +4257,7  <at>  <at>  CIFSFindFirst(const int xid, struct cifs_tcon *tcon,
(Continue reading)

Shirish Pargaonkar | 3 Aug 2012 17:01
Picon

Re: [PATCH v2] cifs: obtain file access during backup intent lookup

On Thu, Aug 2, 2012 at 9:37 AM, Jeff Layton <jlayton@...> wrote:
> On Thu, 2 Aug 2012 01:07:45 -0500
> Shirish Pargaonkar <shirishpargaonkar@...> wrote:
>
>> On Mon, Jul 30, 2012 at 6:00 AM, Jeff Layton <jlayton@...> wrote:
>> > On Wed, 25 Jul 2012 17:45:04 -0500
>> > shirishpargaonkar@... wrote:
>> >
>> >> From: Shirish Pargaonkar <shirishpargaonkar@...>
>> >>
>> >> path based querries can fail for lack of access, especially during lookup
>> >> during open.
>> >> open itself would actually succeed becasue of back up intent bit
>> >> but querries (either path or file handle based) do not have a means to
>> >> specifiy backup intent bit.
>> >> So querry the file info during lookup using
>> >>  trans2 / findfirst2 / file_id_full_ir_info
>> >> to obtain file info as well as file_id/inode value.
>> >>
>> >> Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@...>
>> >> Reported-by: Tushar Gosavi <tugosavi@...>
>> >> ---
>> >>  fs/cifs/cifssmb.c |   38 +++++++++++++++++------------
>> >>  fs/cifs/inode.c   |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++-
>> >>  2 files changed, 87 insertions(+), 18 deletions(-)
>> >>
>> >> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
>> >> index 4ee522b..f059c0a 100644
>> >> --- a/fs/cifs/cifssmb.c
>> >> +++ b/fs/cifs/cifssmb.c
(Continue reading)


Gmane