From: arisawa <arisawa@ar.aichi-u.ac.jp>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] long filenames in cwfs
Date: Mon, 24 Jun 2013 19:57:20 +0900 [thread overview]
Message-ID: <B55FCFD9-69B7-4292-8BE3-08018A73E0B0@ar.aichi-u.ac.jp> (raw)
In-Reply-To: <0fd845b9ba300f41b4f0607ede960285@lyons.quanstro.net>
might be better idea than the one I have been considering.
On 2013/06/23, at 23:08, erik quanstrom <quanstro@quanstro.net> wrote:
> On Sun Jun 23 09:38:01 EDT 2013, arisawa@ar.aichi-u.ac.jp wrote:
>> Thank you cinap,
>>
>> I tried to copy all my Dropbox data to cwfs.
>> the number of files that exceeded 144B name limit was only 3 in 40000 files.
>> I will be happy if cwfs64x natively accepts longer name, but the requirement
>> is almost endless. for example, OSX support 1024B names.
>> I wonder if making NAMELEN larger is the only way to handle the problem.
>
> without a different structure, it is the only way to handle the problem.
>
> a few things to keep in mind about file names. file names when they
> appear in 9p messages can't be split between messages. this applies
> to walk, create, stat or read (of parent directory). i think this places
> the restriction that maxnamelen <= IOUNIT - 43 bytes. the distribution
> limits IOUNIT through the mnt driver to 8192+24. (9atom uses
> 6*8k+24)
>
> there are two basic ways to change the format to deal with this
> 1. provide an escape to point to auxillary storage. this is kind to
> existing storage.
> 2. make the name (and thus the directory entry) variable length.
>
> on our fs (which has python and some other nasties), the average
> file length is 11. making the blocks variable length could save 25%
> (62 directory entries per buffer). but it might be annoying to have
> to migrate the whole fs.
>
> so since there are so few long names, why not waste a whole block
> on them? if using the "standard" (ish) 8k raw block size (8180 for
> data), the expansion of the header could be nil (through creative
> encoding) and there would be 3 extra blocks taken for indirect names.
> for your case, the cost for 144-byte file names would be that DIRPERBUF
> goes from 47 to 31. so most directories > 31 entries will take
> 1.5 x (in the big-O sense) their original space even if there are
> no long names.
>
> - erik
>
next prev parent reply other threads:[~2013-06-24 10:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-23 1:48 arisawa
2013-06-23 7:45 ` cinap_lenrek
2013-06-23 13:36 ` arisawa
2013-06-23 14:08 ` erik quanstrom
2013-06-23 21:59 ` Skip Tavakkolian
2013-06-24 13:03 ` erik quanstrom
2013-06-24 10:57 ` arisawa [this message]
2013-06-24 11:21 ` hiro
2013-06-24 12:43 ` arisawa
2013-06-23 2:11 Erik Quanstrom
2013-06-23 6:19 ` arisawa
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=B55FCFD9-69B7-4292-8BE3-08018A73E0B0@ar.aichi-u.ac.jp \
--to=arisawa@ar.aichi-u.ac.jp \
--cc=9fans@9fans.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).