* REISERFS_MAX_NAME and ENAMETOOLONG
@ 2005-08-22 9:42 Xuân Baldauf
2005-08-22 9:50 ` Vladimir V. Saveliev
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Xuân Baldauf @ 2005-08-22 9:42 UTC (permalink / raw)
To: reiserfs-list
Hello,
when downloading something from java.sun.com (e.g.
http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jdk-1.5.0-doc-oth-JPR&SiteId=JSC&TransactionId=noreg
), very long URLs are encountered. When trying to download using "wget",
wget tries to open a file with those long filenames, and fails with
ENAMETOOLONG (File name too long).
I think that the limit is due to the REISERFS_MAX_NAME macro
(http://lxr.linux.no/source/include/linux/reiserfs_fs.h?v=2.6.10#L1107),
which currently resolves to "255" (which supposedly means 255 bytes).
Is it safe to change REISERFS_MAX_NAME to something larger, or does this
change the disk layout in an unexpected or incompatible way?
Thanks,
Xuân Baldauf.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: REISERFS_MAX_NAME and ENAMETOOLONG
2005-08-22 9:42 REISERFS_MAX_NAME and ENAMETOOLONG Xuân Baldauf
@ 2005-08-22 9:50 ` Vladimir V. Saveliev
2005-08-30 7:01 ` Jeff Mahoney
2005-08-22 13:03 ` Chet Hosey
2005-08-22 14:13 ` michael chang
2 siblings, 1 reply; 6+ messages in thread
From: Vladimir V. Saveliev @ 2005-08-22 9:50 UTC (permalink / raw)
To: Xuân Baldauf; +Cc: reiserfs-list
Hello
Xuân Baldauf wrote:
> Hello,
>
> when downloading something from java.sun.com (e.g.
> http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jdk-1.5.0-doc-oth-JPR&SiteId=JSC&TransactionId=noreg
> ), very long URLs are encountered. When trying to download using "wget",
> wget tries to open a file with those long filenames, and fails with
> ENAMETOOLONG (File name too long).
>
> I think that the limit is due to the REISERFS_MAX_NAME macro
> (http://lxr.linux.no/source/include/linux/reiserfs_fs.h?v=2.6.10#L1107),
> which currently resolves to "255" (which supposedly means 255 bytes).
>
> Is it safe to change REISERFS_MAX_NAME to something larger, or does this
> change the disk layout in an unexpected or incompatible way?
>
Yes. Max long name in reiserfs used to be much longer and then it was changed for compilability with something.
I believe you can easlily change it to 3500.
> Thanks,
>
> Xuân Baldauf.
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REISERFS_MAX_NAME and ENAMETOOLONG
2005-08-22 9:50 ` Vladimir V. Saveliev
@ 2005-08-30 7:01 ` Jeff Mahoney
2005-08-30 8:33 ` Xuân Baldauf
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Mahoney @ 2005-08-30 7:01 UTC (permalink / raw)
To: Vladimir V. Saveliev; +Cc: Xuân Baldauf, reiserfs-list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vladimir V. Saveliev wrote:
> Hello
>
> Xuân Baldauf wrote:
>>Hello,
>>
>>when downloading something from java.sun.com (e.g.
>>http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jdk-1.5.0-doc-oth-JPR&SiteId=JSC&TransactionId=noreg
>>), very long URLs are encountered. When trying to download using "wget",
>>wget tries to open a file with those long filenames, and fails with
>>ENAMETOOLONG (File name too long).
>>
>>I think that the limit is due to the REISERFS_MAX_NAME macro
>>(http://lxr.linux.no/source/include/linux/reiserfs_fs.h?v=2.6.10#L1107),
>>which currently resolves to "255" (which supposedly means 255 bytes).
>>
>>Is it safe to change REISERFS_MAX_NAME to something larger, or does this
>>change the disk layout in an unexpected or incompatible way?
>>
>
> Yes. Max long name in reiserfs used to be much longer and then it was changed for compilability with something.
> I believe you can easlily change it to 3500.
Just as a data point:
http://marc.theaimsgroup.com/?l=reiserfs&m=97908551206263&w=2
The current state:
The kernel doesn't care about the length of a file name, so long as the
maximum path used to access it is below PATH_MAX (currently 4k). dirents
are dynamically sized, so there is no more 255 byte limit inside the kernel.
Glibc still defines dirent->d_name as char[256] for backward
compatibility. If the kernel supports d_reclen (which it has for a very
long time), dirents are treated as dynamically sized. Since glibc
allocates an 8k (_IO_BUFSIZE) buffer and passes it to sys_getdents,
proper bounds checking is done, and the max length is supported.
I did a quick test using your suggestion on my development machine, and
got proper results back.
- -Jeff
- --
Jeff Mahoney
SuSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFDFARnLPWxlyuTD7IRAo1wAJ4lD9WoukhZDVNMu0vvLdAbWZgYkACfR9Zb
y3uYCK410VR/ykpWijRt5xw=
=5Tlx
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REISERFS_MAX_NAME and ENAMETOOLONG
2005-08-30 7:01 ` Jeff Mahoney
@ 2005-08-30 8:33 ` Xuân Baldauf
0 siblings, 0 replies; 6+ messages in thread
From: Xuân Baldauf @ 2005-08-30 8:33 UTC (permalink / raw)
To: Jeff Mahoney; +Cc: Vladimir V. Saveliev, reiserfs-list
Jeff Mahoney wrote:
> Vladimir V. Saveliev wrote:
> >Hello
>
> >Xuân Baldauf wrote:
> >>Hello,
> >>
> >>when downloading something from java.sun.com (e.g.
> >>http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jdk-1.5.0-doc-oth-JPR&SiteId=JSC&TransactionId=noreg
> >>), very long URLs are encountered. When trying to download using "wget",
> >>wget tries to open a file with those long filenames, and fails with
> >>ENAMETOOLONG (File name too long).
> >>
> >>I think that the limit is due to the REISERFS_MAX_NAME macro
> >>(http://lxr.linux.no/source/include/linux/reiserfs_fs.h?v=2.6.10#L1107),
> >>which currently resolves to "255" (which supposedly means 255 bytes).
> >>
> >>Is it safe to change REISERFS_MAX_NAME to something larger, or does this
> >>change the disk layout in an unexpected or incompatible way?
> >>
> >Yes. Max long name in reiserfs used to be much longer and then it was
> changed for compilability with something.
> >I believe you can easlily change it to 3500.
>
> Just as a data point:
>
> http://marc.theaimsgroup.com/?l=reiserfs&m=97908551206263&w=2
Interesting story. :-) It also tells how imposed (arbitrary) limits get
spread (by a kind of "limits group dynamics") instead of getting
removed. :-|
>
> The current state:
>
> The kernel doesn't care about the length of a file name, so long as the
> maximum path used to access it is below PATH_MAX (currently 4k). dirents
> are dynamically sized, so there is no more 255 byte limit inside the
> kernel.
>
> Glibc still defines dirent->d_name as char[256] for backward
> compatibility. If the kernel supports d_reclen (which it has for a very
> long time), dirents are treated as dynamically sized. Since glibc
> allocates an 8k (_IO_BUFSIZE) buffer and passes it to sys_getdents,
> proper bounds checking is done, and the max length is supported.
>
> I did a quick test using your suggestion on my development machine, and
> got proper results back.
So even a full userland recompile is not needed anymore in these days,
because the kernel (REISERFS_MAX_NAME) is the only limiting component
(up to the next limit PATH_MAX)?
>
> -Jeff
Xuân.
>
> --
> Jeff Mahoney
> SuSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REISERFS_MAX_NAME and ENAMETOOLONG
2005-08-22 9:42 REISERFS_MAX_NAME and ENAMETOOLONG Xuân Baldauf
2005-08-22 9:50 ` Vladimir V. Saveliev
@ 2005-08-22 13:03 ` Chet Hosey
2005-08-22 14:13 ` michael chang
2 siblings, 0 replies; 6+ messages in thread
From: Chet Hosey @ 2005-08-22 13:03 UTC (permalink / raw)
To: reiserfs-list
On Mon, Aug 22, 2005 at 11:42:44AM +0200, Xu?n Baldauf wrote:
> Hello,
>
> when downloading something from java.sun.com (e.g.
> http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jdk-1.5.0-doc-oth-JPR&SiteId=JSC&TransactionId=noreg
> ), very long URLs are encountered. When trying to download using "wget",
> wget tries to open a file with those long filenames, and fails with
> ENAMETOOLONG (File name too long).
>
> I think that the limit is due to the REISERFS_MAX_NAME macro
> (http://lxr.linux.no/source/include/linux/reiserfs_fs.h?v=2.6.10#L1107),
> which currently resolves to "255" (which supposedly means 255 bytes).
>
> Is it safe to change REISERFS_MAX_NAME to something larger, or does this
> change the disk layout in an unexpected or incompatible way?
>
> Thanks,
>
> Xu?n Baldauf.
>
I'm sure you've investigated this, but you might also consider the -O
option to wget -- it probably isn't quite what you're looking for if you
are fetching multiple files (such as with --mirror), but when fetching
one file at a time it's quite a bit less drastic than recompiling the
kernel and putting extremely long file names on disk.
Chet
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REISERFS_MAX_NAME and ENAMETOOLONG
2005-08-22 9:42 REISERFS_MAX_NAME and ENAMETOOLONG Xuân Baldauf
2005-08-22 9:50 ` Vladimir V. Saveliev
2005-08-22 13:03 ` Chet Hosey
@ 2005-08-22 14:13 ` michael chang
2 siblings, 0 replies; 6+ messages in thread
From: michael chang @ 2005-08-22 14:13 UTC (permalink / raw)
To: Xuân Baldauf; +Cc: reiserfs-list
On 8/22/05, Xuân Baldauf
<xuan--2005.08.22--reiserfs-list--namesys.com@baldauf.org> wrote:
> when downloading something from java.sun.com (e.g.
> http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jdk-1.5.0-doc-oth-JPR&SiteId=JSC&TransactionId=noreg
> ), very long URLs are encountered. When trying to download using "wget",
> wget tries to open a file with those long filenames, and fails with
> ENAMETOOLONG (File name too long).
You may want to also try using a different way of downloading files --
for example, most of the files from the download center will supply
much shorter filenames to many standard browsers (e.g. Mozilla
Firefox, Mozilla, Opera, perhaps Konquerer and whatever GNOME uses,
and maybe lynx/links/links2/elinks (dunno which)). Also, if you're
mirroring, try looking at HTTrack. [Although, yes, wget is much
smaller. ^^]
--
~Mike
- Just my two cents
- No man is an island, and no man is unable.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-08-30 8:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-22 9:42 REISERFS_MAX_NAME and ENAMETOOLONG Xuân Baldauf
2005-08-22 9:50 ` Vladimir V. Saveliev
2005-08-30 7:01 ` Jeff Mahoney
2005-08-30 8:33 ` Xuân Baldauf
2005-08-22 13:03 ` Chet Hosey
2005-08-22 14:13 ` michael chang
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.