* can I change NAME_MAX limit
@ 2019-05-07 9:48 litaibaichina
2019-05-07 10:57 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: litaibaichina @ 2019-05-07 9:48 UTC (permalink / raw)
To: linux-btrfs@vger.kernel.org
Hi Guys,
I am running btrfs on a 4.4.178 kernel, I want to support a longer file name, now the NAME_MAX is 255, can I just increase the NAME_MAX macro and recompile the kernel to support longer file name ? I guess I will break sth, but I am not sure what part will be broken.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: can I change NAME_MAX limit
2019-05-07 9:48 can I change NAME_MAX limit litaibaichina
@ 2019-05-07 10:57 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2019-05-07 10:57 UTC (permalink / raw)
To: litaibaichina@gmail.com; +Cc: linux-btrfs@vger.kernel.org
On Tue, May 07, 2019 at 05:48:47PM +0800, litaibaichina@gmail.com wrote:
> I am running btrfs on a 4.4.178 kernel, I want to support a longer
> file name, now the NAME_MAX is 255, can I just increase the NAME_MAX
> macro and recompile the kernel to support longer file name ? I guess
> I will break sth, but I am not sure what part will be broken.
NAME_MAX is system-wide and defined in limits.h. This is not btrfs
specific, you'd need to recompile the whole userspace too and who knows
what would break.
255 fits into a byte and I think some filesystems use that as maximum
that can be stored in their metdata, ie. not possible to change without
wider thanges.
Btrfs has space in btrfs_dir_item as it stores the name as 16bit number.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-07 10:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-07 9:48 can I change NAME_MAX limit litaibaichina
2019-05-07 10:57 ` David Sterba
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.