Quantcast

[SOLVED] problem with getattr calls in latest fuse 2-9-3

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[SOLVED] problem with getattr calls in latest fuse 2-9-3

kingsmasher1
This post was updated on .
I downloaded the latest fuse 2-9-3 and trying the fusexmp_fh.c, and I can see doing “ls –l” in fuse-mount there is one getattr( ) call per file or directory present inside the fuse-mount although readdir( ) in fuse_xmp_fh.c  calls filler function with proper offset and passing file attributes in stat: if (filler(buf, d->entry->d_name, &st, nextoff))

Now in one of the forum post http://sourceforge.net/mailarchive/message.php?msg_id=25409872, it is said using proper offset instead of 0 in  filler function may reduce the getattr calls, but it does not happen.

Any suggestions please.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

Miklos Szeredi
On Fri, Feb 21, 2014 at 12:17 PM, kingsmasher1
<[hidden email]> wrote:
> I downloaded the latest fuse 2-9-3 and trying the fusexmp_fh.c, and I can see
> doing “ls –l” in fuse-mount there is one getattr( ) call per file or
> directory present inside the fuse-mount

This is not really surprising.  Look at the output of

strace -o /tmp/strace ls -l dir

"ls -l" will call lstat(2) for each entry.  lstat() is then translated
to getattr() on the fuse API.

Recent kernels and the git version of fuse contains readdirplus
support.  With this you can preset the cache during readdir.

Thanks,
Miklos

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

kingsmasher1
Thanks for the reply Miklos.

I understood, so if instead of calling lstat in getattr, if readdir provides a complete implementation, with every info for the file it reads, populating the stat structure properly instead of just providing "st.st_ino = de->d_ino; st.st_mode = de->d_type << 12;" Then this overhead can be avoided.

I wanted to demonstrate a POC to my team for this (reducing the getattr calls), by any chance do we have any example code somewhere, which can be quickly tested?



On Fri, Feb 21, 2014 at 9:14 PM, Miklos Szeredi [via Fuse] <[hidden email]> wrote:
On Fri, Feb 21, 2014 at 12:17 PM, kingsmasher1
<[hidden email]> wrote:
> I downloaded the latest fuse 2-9-3 and trying the fusexmp_fh.c, and I can see
> doing “ls –l” in fuse-mount there is one getattr( ) call per file or
> directory present inside the fuse-mount

This is not really surprising.  Look at the output of

strace -o /tmp/strace ls -l dir

"ls -l" will call lstat(2) for each entry.  lstat() is then translated
to getattr() on the fuse API.

Recent kernels and the git version of fuse contains readdirplus
support.  With this you can preset the cache during readdir.

Thanks,
Miklos

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel



If you reply to this email, your message will be added to the discussion below:
http://fuse.996288.n3.nabble.com/problem-with-getattr-calls-in-latest-fuse-2-9-3-tp12009p12010.html
To unsubscribe from problem with getattr calls in latest fuse 2-9-3, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

kingsmasher1
In reply to this post by Miklos Szeredi
Miklos, one more query, if you can please help me.

So as i understand, these are 2 mandates to reduce the getattr hits in listing directories:-

1) filler function should have non-zero offset
2) readdir should completely fill the "stat structure" for each of the files it reads from the dir

Relating to (1) I tried a random sequence number in our code for the filler function as you suggested in the URL (random i mean serially, 1, 2, 3 etc), earlier 0 was being passed. I can see, ls is unable to list any files, do you think random sequence number is the culprit here?


On Fri, Feb 21, 2014 at 9:14 PM, Miklos Szeredi [via Fuse] <[hidden email]> wrote:
On Fri, Feb 21, 2014 at 12:17 PM, kingsmasher1
<[hidden email]> wrote:
> I downloaded the latest fuse 2-9-3 and trying the fusexmp_fh.c, and I can see
> doing “ls –l” in fuse-mount there is one getattr( ) call per file or
> directory present inside the fuse-mount

This is not really surprising.  Look at the output of

strace -o /tmp/strace ls -l dir

"ls -l" will call lstat(2) for each entry.  lstat() is then translated
to getattr() on the fuse API.

Recent kernels and the git version of fuse contains readdirplus
support.  With this you can preset the cache during readdir.

Thanks,
Miklos

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel



If you reply to this email, your message will be added to the discussion below:
http://fuse.996288.n3.nabble.com/problem-with-getattr-calls-in-latest-fuse-2-9-3-tp12009p12010.html
To unsubscribe from problem with getattr calls in latest fuse 2-9-3, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

kingsmasher1
In reply to this post by Miklos Szeredi
What i mean is, can't random sequence numbers be used in filler( ) function offset rather than the actual offset using "telldir(dp)"


On Fri, Feb 21, 2014 at 10:10 PM, Raj Kumar Sanpui <[hidden email]> wrote:
Miklos, one more query, if you can please help me.

So as i understand, these are 2 mandates to reduce the getattr hits in listing directories:-

1) filler function should have non-zero offset
2) readdir should completely fill the "stat structure" for each of the files it reads from the dir

Relating to (1) I tried a random sequence number in our code for the filler function as you suggested in the URL (random i mean serially, 1, 2, 3 etc), earlier 0 was being passed. I can see, ls is unable to list any files, do you think random sequence number is the culprit here?


On Fri, Feb 21, 2014 at 9:14 PM, Miklos Szeredi [via Fuse] <[hidden email]> wrote:
On Fri, Feb 21, 2014 at 12:17 PM, kingsmasher1
<[hidden email]> wrote:
> I downloaded the latest fuse 2-9-3 and trying the fusexmp_fh.c, and I can see
> doing “ls –l” in fuse-mount there is one getattr( ) call per file or
> directory present inside the fuse-mount

This is not really surprising.  Look at the output of

strace -o /tmp/strace ls -l dir

"ls -l" will call lstat(2) for each entry.  lstat() is then translated
to getattr() on the fuse API.

Recent kernels and the git version of fuse contains readdirplus
support.  With this you can preset the cache during readdir.

Thanks,
Miklos

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel



If you reply to this email, your message will be added to the discussion below:
http://fuse.996288.n3.nabble.com/problem-with-getattr-calls-in-latest-fuse-2-9-3-tp12009p12010.html
To unsubscribe from problem with getattr calls in latest fuse 2-9-3, click here.
NAML


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

Miklos Szeredi
In reply to this post by kingsmasher1
On Fri, Feb 21, 2014 at 5:41 PM, kingsmasher1
<[hidden email]> wrote:

> Miklos, one more query, if you can please help me.
>
> So as i understand, these are 2 mandates to reduce the getattr hits in
> listing directories:-
>
> 1) filler function should have non-zero offset
> 2) readdir should completely fill the "stat structure" for each of the
> files it reads from the dir
>
> Relating to (1) I tried a random sequence number in our code for the filler
> function as you suggested in the URL (random i mean serially, 1, 2, 3 etc),
> earlier 0 was being passed. I can see, ls is unable to list any files, do
> you think random sequence number is the culprit here?

The offset only matters if seekdir() is used (it's not used by "ls -l").

Filling the stat completely works only if you implement the
->readdirplus() callback.

I just added "fuse_lo-plus" to the examples.  To try out do:

git clone git://git.code.sf.net/p/fuse/fuse
cd fuse
./makeconf.sh
./configure
make
cd example
mkdir /tmp/fuse
./fuse_lo-plus -d /tmp/fuse

BTW, this is just an example on how to use the readdirplus API, it's
not a high performance loopback implementation (in fact "ls -l" is a
lot slower than in fusexmp_fh).

Thanks,
Miklos

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

kingsmasher1
Thanks a lot Miklos.
I can see the code of the example fuse_lo-plus.c, that you are using the
low level implementation APIs, "fuse_lowlevel.h", but our code uses
everything from fuse.c in struct fuse_operations. Do you have any similar
APIs for the high level counterpart?

Thank You.

On Fri, Feb 21, 2014 at 10:32 PM, Miklos Szeredi <[hidden email]> wrote:

> On Fri, Feb 21, 2014 at 5:41 PM, kingsmasher1
> <[hidden email]> wrote:
> > Miklos, one more query, if you can please help me.
> >
> > So as i understand, these are 2 mandates to reduce the getattr hits in
> > listing directories:-
> >
> > 1) filler function should have non-zero offset
> > 2) readdir should completely fill the "stat structure" for each of the
> > files it reads from the dir
> >
> > Relating to (1) I tried a random sequence number in our code for the
> filler
> > function as you suggested in the URL (random i mean serially, 1, 2, 3
> etc),
> > earlier 0 was being passed. I can see, ls is unable to list any files, do
> > you think random sequence number is the culprit here?
>
> The offset only matters if seekdir() is used (it's not used by "ls -l").
>
> Filling the stat completely works only if you implement the
> ->readdirplus() callback.
>
> I just added "fuse_lo-plus" to the examples.  To try out do:
>
> git clone git://git.code.sf.net/p/fuse/fuse
> cd fuse
> ./makeconf.sh
> ./configure
> make
> cd example
> mkdir /tmp/fuse
> ./fuse_lo-plus -d /tmp/fuse
>
> BTW, this is just an example on how to use the readdirplus API, it's
> not a high performance loopback implementation (in fact "ls -l" is a
> lot slower than in fusexmp_fh).
>
> Thanks,
> Miklos
>
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

kingsmasher1
Hi Miklos,

If you see, the fuse_lowlevel has a totally different parameter sets, and
requires different way of initialization unlike on the high level sets of
APIs which just requires calling fuse_main( ) and populating the callbacks
of "struct fuse_operations".  Or in other words, the high level one, is
filename based, and the "fuse_lowlevel" is inode number based. Our entire
code is, based on filename convention and porting it to "fuse_lowlevel"
just for one API, might not be a very feasible option at the moment.

Thus, it's my humble request, if we can have a similar readdir_plus API on
the high level counterpart too. Please let me know your views, as to or
when we can expect that.

In between, Friday night i made heavy code changes in our product code, and
properly initializing the filler buffer, and i could see, doing "ls" the
number of getattr calls, have been significantly reduced. As the log shows,
there is one getattr call, when it checks for the root node "/" and once
the readir API call is made, "ifm_readdir - our implementation of readdir
callback" post that there are no getattr calls at all.

Thanks


On Fri, Feb 21, 2014 at 10:45 PM, Raj Kumar Sanpui <
[hidden email]> wrote:

> Thanks a lot Miklos.
> I can see the code of the example fuse_lo-plus.c, that you are using the
> low level implementation APIs, "fuse_lowlevel.h", but our code uses
> everything from fuse.c in struct fuse_operations. Do you have any similar
> APIs for the high level counterpart?
>
> Thank You.
>
> On Fri, Feb 21, 2014 at 10:32 PM, Miklos Szeredi <[hidden email]>wrote:
>
>> On Fri, Feb 21, 2014 at 5:41 PM, kingsmasher1
>> <[hidden email]> wrote:
>> > Miklos, one more query, if you can please help me.
>> >
>> > So as i understand, these are 2 mandates to reduce the getattr hits in
>> > listing directories:-
>> >
>> > 1) filler function should have non-zero offset
>> > 2) readdir should completely fill the "stat structure" for each of the
>> > files it reads from the dir
>> >
>> > Relating to (1) I tried a random sequence number in our code for the
>> filler
>> > function as you suggested in the URL (random i mean serially, 1, 2, 3
>> etc),
>> > earlier 0 was being passed. I can see, ls is unable to list any files,
>> do
>> > you think random sequence number is the culprit here?
>>
>> The offset only matters if seekdir() is used (it's not used by "ls -l").
>>
>> Filling the stat completely works only if you implement the
>> ->readdirplus() callback.
>>
>> I just added "fuse_lo-plus" to the examples.  To try out do:
>>
>> git clone git://git.code.sf.net/p/fuse/fuse
>> cd fuse
>> ./makeconf.sh
>> ./configure
>> make
>> cd example
>> mkdir /tmp/fuse
>> ./fuse_lo-plus -d /tmp/fuse
>>
>> BTW, this is just an example on how to use the readdirplus API, it's
>> not a high performance loopback implementation (in fact "ls -l" is a
>> lot slower than in fusexmp_fh).
>>
>> Thanks,
>> Miklos
>>
>
>
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

Miklos Szeredi
On Mon, Feb 24, 2014 at 8:55 AM, Raj Kumar Sanpui
<[hidden email]> wrote:

> Hi Miklos,
>
> If you see, the fuse_lowlevel has a totally different parameter sets, and
> requires different way of initialization unlike on the high level sets of
> APIs which just requires calling fuse_main( ) and populating the callbacks
> of "struct fuse_operations".  Or in other words, the high level one, is
> filename based, and the "fuse_lowlevel" is inode number based. Our entire
> code is, based on filename convention and porting it to "fuse_lowlevel" just
> for one API, might not be a very feasible option at the moment.
>
> Thus, it's my humble request, if we can have a similar readdir_plus API on
> the high level counterpart too. Please let me know your views, as to or when
> we can expect that.

Please check the latest libfuse git tree.  It has a solution that I
think will meet your needs.

Thanks,
Miklos

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

kingsmasher1
Thanks a lot Miklos, that was immensely helpful, and exactly what we were looking for.
I can download the libfuse using git and that will be sufficient for my dev environment for compilation.

However, for deploying it to our environment i can see the fuse RPMs are 2.9.3 as the latest available, and i don't think it has the highlevel readdir_plus available yet. When can we expect that any clue?

Also, i can see the latest fuse revision that is included in RPMs is 8 months old (we use SuSE): https://build.opensuse.org/package/revisions/filesystems/fuse

Can you please suggest something regarding this.

Thanks in advance.


On Wed, Mar 5, 2014 at 9:44 PM, Miklos Szeredi [via Fuse] <[hidden email]> wrote:
On Mon, Feb 24, 2014 at 8:55 AM, Raj Kumar Sanpui
<[hidden email]> wrote:

> Hi Miklos,
>
> If you see, the fuse_lowlevel has a totally different parameter sets, and
> requires different way of initialization unlike on the high level sets of
> APIs which just requires calling fuse_main( ) and populating the callbacks
> of "struct fuse_operations".  Or in other words, the high level one, is
> filename based, and the "fuse_lowlevel" is inode number based. Our entire
> code is, based on filename convention and porting it to "fuse_lowlevel" just
> for one API, might not be a very feasible option at the moment.
>
> Thus, it's my humble request, if we can have a similar readdir_plus API on
> the high level counterpart too. Please let me know your views, as to or when
> we can expect that.
Please check the latest libfuse git tree.  It has a solution that I
think will meet your needs.

Thanks,
Miklos

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk

_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel



If you reply to this email, your message will be added to the discussion below:
http://fuse.996288.n3.nabble.com/problem-with-getattr-calls-in-latest-fuse-2-9-3-tp12009p12037.html
To unsubscribe from problem with getattr calls in latest fuse 2-9-3, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

Miklos Szeredi
On Tue, Mar 11, 2014 at 4:01 PM, kingsmasher1
<[hidden email]> wrote:

> Thanks a lot Miklos, that was immensely helpful, and exactly what we were
> looking for.
> I can download the libfuse using git and that will be sufficient for my dev
> environment for compilation.
>
> However, for deploying it to our environment i can see the fuse RPMs are
> 2.9.3 as the latest available, and i don't think it has the highlevel
> readdir_plus available yet. When can we expect that any clue?
>
> Also, i can see the latest fuse revision that is included in RPMs is 8
> months old (we use SuSE):
> https://build.opensuse.org/package/revisions/filesystems/fuse
>
> Can you please suggest something regarding this.

Untested packages here:

https://build.opensuse.org/package/binaries/home:mszeredi:branches:filesystems/fuse?repository=openSUSE_12.3

Will work on a proper 3.0 release when I have time.

Thanks,
Miklos

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

kingsmasher1
In reply to this post by Miklos Szeredi
Hi Miklos,

I am getting some compilation issues in your latest library which has readdir_plus.
Here are the errors:

{{{

mv -f $depbase.Tpo $depbase.Po
fuse_lo-plus.c: In function âlo_getattrâ:
fuse_lo-plus.c:76: error: âAT_EMPTY_PATHâ undeclared (first use in this function)
fuse_lo-plus.c:76: error: (Each undeclared identifier is reported only once
fuse_lo-plus.c:76: error: for each function it appears in.)
fuse_lo-plus.c: In function âlo_do_lookupâ:
fuse_lo-plus.c:106: error: âO_PATHâ undeclared (first use in this function)
fuse_lo-plus.c:110: error: âAT_EMPTY_PATHâ undeclared (first use in this function)
fuse_lo-plus.c: In function âmainâ:
fuse_lo-plus.c:424: error: âO_PATHâ undeclared (first use in this function)
make[1]: *** [fuse_lo-plus.o] Error 1
make[1]: Leaving directory `/home/rajkumar/workspace/src/fuse/example'
make: *** [all-recursive] Error 1

}}}

Running ./configure, gave me this:
{{{
checking if umount supports --fake --no-canonicalize... umount: unrecognized option '--fake'
configure: creating ./config.status
config.status: creating fuse3.pc
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating util/Makefile
config.status: creating example/Makefile
config.status: creating include/Makefile
config.status: creating doc/Makefile
config.status: creating include/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING:
******************************************************************
* Please install util-linux version 2.18 or later which supports *
* --fake and --no-canonicalize options in mount and umount       *
******************************************************************
}}}

Plese note that, i was earlier facing some issues related to AM_CONFIGURE, and i re-installed the latest versions of gettext library and the libiconv library.

Please help me, so that i can use your readdir_plus API.

Thanks,
Raj Kumar




On Fri, Feb 21, 2014 at 10:34 PM, Miklos Szeredi [via Fuse] <[hidden email]> wrote:
On Fri, Feb 21, 2014 at 5:41 PM, kingsmasher1
<[hidden email]> wrote:

> Miklos, one more query, if you can please help me.
>
> So as i understand, these are 2 mandates to reduce the getattr hits in
> listing directories:-
>
> 1) filler function should have non-zero offset
> 2) readdir should completely fill the "stat structure" for each of the
> files it reads from the dir
>
> Relating to (1) I tried a random sequence number in our code for the filler
> function as you suggested in the URL (random i mean serially, 1, 2, 3 etc),
> earlier 0 was being passed. I can see, ls is unable to list any files, do
> you think random sequence number is the culprit here?
The offset only matters if seekdir() is used (it's not used by "ls -l").

Filling the stat completely works only if you implement the
->readdirplus() callback.

I just added "fuse_lo-plus" to the examples.  To try out do:

git clone git://git.code.sf.net/p/fuse/fuse
cd fuse
./makeconf.sh
./configure
make
cd example
mkdir /tmp/fuse
./fuse_lo-plus -d /tmp/fuse

BTW, this is just an example on how to use the readdirplus API, it's
not a high performance loopback implementation (in fact "ls -l" is a
lot slower than in fusexmp_fh).

Thanks,
Miklos

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel



If you reply to this email, your message will be added to the discussion below:
http://fuse.996288.n3.nabble.com/problem-with-getattr-calls-in-latest-fuse-2-9-3-tp12009p12014.html
To unsubscribe from problem with getattr calls in latest fuse 2-9-3, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

kingsmasher1
In reply to this post by Miklos Szeredi
Thanks a lot Miklos, the latest version in the git solves all the issues.
Just one question:

In the code for "FUSE_READDIR_PLUS"  it is mentioned that, this flag needs to be set in the filesystem or it can be ignored too, can you please tell me, how to add this flag in the filesystem? I tried something like: 

"./fusexmp_fh /mnt/test -o FUSE_READDIR_PLUS"

but it does not work.

Regards
Raj Kumar 


On Mon, Mar 17, 2014 at 8:12 PM, Raj Kumar Sanpui <[hidden email]> wrote:
Hi Miklos,

I am getting some compilation issues in your latest library which has readdir_plus.
Here are the errors:

{{{

mv -f $depbase.Tpo $depbase.Po
fuse_lo-plus.c: In function âlo_getattrâ:
fuse_lo-plus.c:76: error: âAT_EMPTY_PATHâ undeclared (first use in this function)
fuse_lo-plus.c:76: error: (Each undeclared identifier is reported only once
fuse_lo-plus.c:76: error: for each function it appears in.)
fuse_lo-plus.c: In function âlo_do_lookupâ:
fuse_lo-plus.c:106: error: âO_PATHâ undeclared (first use in this function)
fuse_lo-plus.c:110: error: âAT_EMPTY_PATHâ undeclared (first use in this function)
fuse_lo-plus.c: In function âmainâ:
fuse_lo-plus.c:424: error: âO_PATHâ undeclared (first use in this function)
make[1]: *** [fuse_lo-plus.o] Error 1
make[1]: Leaving directory `/home/rajkumar/workspace/src/fuse/example'
make: *** [all-recursive] Error 1

}}}

Running ./configure, gave me this:
{{{
checking if umount supports --fake --no-canonicalize... umount: unrecognized option '--fake'
configure: creating ./config.status
config.status: creating fuse3.pc
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating util/Makefile
config.status: creating example/Makefile
config.status: creating include/Makefile
config.status: creating doc/Makefile
config.status: creating include/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING:
******************************************************************
* Please install util-linux version 2.18 or later which supports *
* --fake and --no-canonicalize options in mount and umount       *
******************************************************************
}}}

Plese note that, i was earlier facing some issues related to AM_CONFIGURE, and i re-installed the latest versions of gettext library and the libiconv library.

Please help me, so that i can use your readdir_plus API.

Thanks,
Raj Kumar




On Fri, Feb 21, 2014 at 10:34 PM, Miklos Szeredi [via Fuse] <[hidden email]> wrote:
On Fri, Feb 21, 2014 at 5:41 PM, kingsmasher1
<[hidden email]> wrote:

> Miklos, one more query, if you can please help me.
>
> So as i understand, these are 2 mandates to reduce the getattr hits in
> listing directories:-
>
> 1) filler function should have non-zero offset
> 2) readdir should completely fill the "stat structure" for each of the
> files it reads from the dir
>
> Relating to (1) I tried a random sequence number in our code for the filler
> function as you suggested in the URL (random i mean serially, 1, 2, 3 etc),
> earlier 0 was being passed. I can see, ls is unable to list any files, do
> you think random sequence number is the culprit here?
The offset only matters if seekdir() is used (it's not used by "ls -l").

Filling the stat completely works only if you implement the
->readdirplus() callback.

I just added "fuse_lo-plus" to the examples.  To try out do:

git clone git://git.code.sf.net/p/fuse/fuse
cd fuse
./makeconf.sh
./configure
make
cd example
mkdir /tmp/fuse
./fuse_lo-plus -d /tmp/fuse

BTW, this is just an example on how to use the readdirplus API, it's
not a high performance loopback implementation (in fact "ls -l" is a
lot slower than in fusexmp_fh).

Thanks,
Miklos

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel



If you reply to this email, your message will be added to the discussion below:
http://fuse.996288.n3.nabble.com/problem-with-getattr-calls-in-latest-fuse-2-9-3-tp12009p12014.html
To unsubscribe from problem with getattr calls in latest fuse 2-9-3, click here.
NAML


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem with getattr calls in latest fuse 2-9-3

Miklos Szeredi
On Thu, Mar 27, 2014 at 12:22 PM, kingsmasher1
<[hidden email]> wrote:

> Thanks a lot Miklos, the latest version in the git solves all the issues.
> Just one question:
>
> In the code for "FUSE_READDIR_PLUS"  it is mentioned that, this flag needs
> to be set in the filesystem or it can be ignored too, can you please tell
> me, how to add this flag in the filesystem? I tried something like:
>
> "./fusexmp_fh /mnt/test -o FUSE_READDIR_PLUS"
>
> but it does not work.

You don't need to set FUSE_READDIR_PLUS, the fuse library will do
that.  You do need to set FUSE_FILL_DIR_PLUS, however.

If the explanation in the header isn't clear enough, please look at
the example code in fusexmp_fh.c

Thanks,
Miklos

------------------------------------------------------------------------------
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Loading...