From: Eric Sandeen <sandeen@sandeen.net>
To: Chris Walker <christopher.walker@gmail.com>
Cc: xfs@oss.sgi.com
Subject: Re: quick question about filename length
Date: Sat, 16 May 2009 12:04:40 -0500 [thread overview]
Message-ID: <4A0EF228.3010702@sandeen.net> (raw)
In-Reply-To: <554e24be0905160915l49ff901bn41e4332349c555bc@mail.gmail.com>
Chris Walker wrote:
> Hello,
>
> I see that
> #define MAXNAMELEN 256
>
> Is this the maximum length of the filename with full path? Or is this
> just the name of the file?
>
> Many thanks!
> Chris
/*
* MAXNAMELEN is the length (including the terminating null) of
* the longest permissible file (component) name.
*/
#define MAXNAMELEN 256
"component" means path component. So just the name of the file or dir
in the path.
See also how it's used in xfs_vn_lookup() for example:
if (dentry->d_name.len >= MAXNAMELEN)
return ERR_PTR(-ENAMETOOLONG);
a dentry is one component of the path, not the entire path.
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-05-16 17:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-16 16:15 quick question about filename length Chris Walker
2009-05-16 17:04 ` Eric Sandeen [this message]
2009-05-16 18:06 ` Chris Walker
2009-05-16 20:25 ` Christoph Hellwig
2009-05-16 21:42 ` Martin Steigerwald
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=4A0EF228.3010702@sandeen.net \
--to=sandeen@sandeen.net \
--cc=christopher.walker@gmail.com \
--cc=xfs@oss.sgi.com \
/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.