Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Longname: files/directories name upto 1023 bytes #15921

Closed
wants to merge 4 commits into from

Commits on Sep 23, 2024

  1. Allocate zap_attribute_t from kmem instead of stack

    This patch is preparatory work for long name feature. It changes all
    users of zap_attribute_t to allocate it from kmem instead of stack. It
    also make zap_attribute_t and zap_name_t structure variable length.
    
    Signed-off-by: Chunwei Chen <[email protected]>
    sanjeevbagewadinutanix authored and davidchenntnx committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    d346792 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. Support for longnames for files/directories (Linux part)

    This patch adds the ability for zfs to support file/dir name up to 1023
    bytes. This number is chosen so we can support up to 255 4-byte
    characters. This new feature is represented by the new feature flag
    feature@longname.
    
    A new dataset property "longname" is also introduced to toggle longname
    support for each dataset individually. This property can be disabled,
    even if it contains longname files. In such case, new file cannot be
    created with longname but existing longname files can still be looked
    up.
    
    Note that, to my knowledge native Linux filesystems don't support name
    longer than 255 bytes. So there might be programs not able to work with
    longname.
    
    Note that NFS server may needs to use exportfs_get_name to reconnect
    dentries, and the buffer being passed is limit to NAME_MAX+1 (256). So
    NFS may not work when longname is enabled.
    
    Signed-off-by: Chunwei Chen <[email protected]>
    sanjeevbagewadinutanix authored and davidchenntnx committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    eba9acc View commit details
    Browse the repository at this point in the history
  2. Support for longnames for files/directories (FreeBSD part/Doesn't work)

    Note, FreeBSD vfs layer imposes a limit of 255 name lengh, so even
    though we add code to support it here, it won't actually work.
    
    Signed-off-by: Chunwei Chen <[email protected]>
    davidchenntnx committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    28cfb41 View commit details
    Browse the repository at this point in the history
  3. Add longname to zpool-features.7

    Signed-off-by: Chunwei Chen <[email protected]>
    davidchenntnx committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    8c690e2 View commit details
    Browse the repository at this point in the history