All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
To: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Cc: Stef Bon <stefbon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-cifs <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Zero size and zero blocks mountpoint.
Date: Mon, 27 Sep 2010 18:23:40 +0530	[thread overview]
Message-ID: <4CA093D4.4060708@suse.de> (raw)
In-Reply-To: <20100920085140.4b844270-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>

On 09/20/2010 09:21 PM, Jeff Layton wrote:
>>>>
>>>> It's causing some unwanted behaviour.
>>>> How can I change that, or is this not changeable?
>>>> Stef
>>>
>>> I think it's just a matter of setting the inode->i_size on the
>>> directory. I *think* that when you do a QPathInfo call to a directory
>>> via cifs the size comes back 0. Setting this to something else probably
>>> means an extra call to the server to get the "real" size (whatever that
>>> means). The question is, what should this be set to?
>>>
>>
>> Yes that's a good question. But a share mounted with cifs should
>> behave like it is's just a local harddrive partition right? So these
>> values are obligatory...
>>
> 
> No, not necessarily.
> 
>>  In my construction - so I'm speaking only for my own here -
>> it's also set the size (and the blocks) in the FUSE fs. Remember, I'm
>> using the FUSE fs fuse-workspace
>> as the one which is used, and the various mounts to resources like smb
>> shares (mounted with cifs of course, managed with autofs) are the
>> underlying backend.
>>
>> My FUSE can correct things, like this.
>>
>> I wonder, it can correct things, but is it also a must?
>> My fuse fs takes these values just from the underlying fs, and this
>> can result in
>> a size of directories of 4096 when the underlying fs is a mounted
>> partition (of for example an USB disk) and zero
>> when it's a cifs mounted smb share. Is it a bad thing that these
>> values differ in the same fs (in my case thus fuse-workspace)??
>>
>> Maybe you know this, else I'll try at the fsdevel list.
>>
> 
> It really comes down to this question:
> 
>     What is the size on a directory supposed to signify?
> 

(Sorry for digging an old thread..)

I think it is really the space required (filesystem thinks it requires)
for storing the metadata about the files that would be stored and it
depends on the internal datastructures of the filesystem. It never
shrinks but expands when the number of files increases.

For e.g. On a ext3 filesystem, it looks like the default size of
directory on creation is 4096/4k and somewhere between 325 files and 350
files, it changes from 4k to 12k.

To get the same behavior on CIFS, the client needs to be aware of the
Server filesystem and need to have a rough idea of datastructures unless
the Server provides the size. Also, the client needs to increase the
size to replicate the same behavior when the number of files on the
server increases.

I think the nearest information about the Server filesystem the client
could get is 'block size' and the client could try to do some clever
guess, but it may not always get it correct.


-- 
Suresh Jayaraman

  parent reply	other threads:[~2010-09-27 12:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-19 19:28 Zero size and zero blocks mountpoint Stef Bon
     [not found] ` <AANLkTi=GPOoF5bOdySz2izWTEEBShZ8LG=SWPKZVHCU8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-19 22:04   ` Jeff Layton
     [not found]     ` <20100919150427.16ab30d9-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-09-20  7:29       ` Stef Bon
     [not found]         ` <AANLkTik04e_d9HPeGsB8Adcm2tpGh-qEOwcQvu6ScP3D-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-20 15:51           ` Jeff Layton
     [not found]             ` <20100920085140.4b844270-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-09-27 12:53               ` Suresh Jayaraman [this message]
     [not found]                 ` <4CA093D4.4060708-l3A5Bk7waGM@public.gmane.org>
2010-09-27 12:59                   ` Jeff Layton
  -- strict thread matches above, loose matches on Subject: below --
2010-09-24 11:18 Alex Perez
     [not found] ` <AANLkTinLwfXhcsAOPEK8reNRyWeyQnzGKm7uQOpYhM_5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-24 11:35   ` Jeff Layton
     [not found]     ` <20100924073515.7b441fa3-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-09-24 17:44       ` Stef Bon
     [not found]         ` <AANLkTim5dVdQuihXizVSey7VmRZOEKDh9STqKzxy1Vv2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-24 18:02           ` Jeff Layton
     [not found]             ` <20100924140210.719a8f46-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-09-24 18:08               ` Steve French
2010-09-27 12:11       ` Suresh Jayaraman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CA093D4.4060708@suse.de \
    --to=sjayaraman-l3a5bk7wagm@public.gmane.org \
    --cc=jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=stefbon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.