Project

General

Profile

Actions

Enhancement #79375

closed
CH CH

client: allow user to view and set alternate_name

Enhancement #79375: client: allow user to view and set alternate_name

Added by Christopher Hoffman 4 months ago. Updated 27 days ago.

Status:
Backporting
Priority:
Normal
Category:
Administration/Usability
Target version:
Due date:
% Done:

0%

Source:
Development
Backport:
umbrella
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client
Labels (FS):
fscrypt
Pull request ID:
Tags (freeform):
Fixed In:
v22.0.0-539-gbfdca23544
Released In:
Upkeep Timestamp:
2026-11-06T05:08:40+00:00

Description

Background

The alternate_name is used for case insensitivity and fscrypt to store original input of an dirent name (dname). For case insensitivity, it will be the original case sensitive value and for fscrypt it will be the raw ciphertext. As the client currently stands, this field is not to be visible to the end user. This adds guardrails to prevent breakage through unintended values, being overwritten or deleted. If this value is set improperly, it can break the internal client mechanisms.

This will enable the capability of administrators being able to backup fscrypt enabled dir trees without needing the key. The main drive of this will be fscrypt backup, future work done will validate case sensitivity.

Proposal

Introduce a new xattr "ceph.alternate_name" to access this field. This xattr will only be visible based on an advanced bool config option called client_alternate_name_visible. Enabling this option will explicitly put the responsibility of setting alternate_name on the end user. This means mechanisms that normally exist within fscrypt to generate per-file keys will be disabled.

Key behavior and properties

  • The value is immutable, cannot be overwritten or deleted.
  • The exception is if the same alternate_name is provided, it will perform no-op. No error will be returned. This will help with backup restarts.
  • parent dir must contain proper fscrypt information (fscrypt_auth field) This is removed as we cannot determine top level dir, the system administrator MUST know what they are doing when using this feature.
  • when inode is created, fscrypt_auth, fscrypt_file and alternate_name will not be populated

Scenario

Set config options for fscrypt case

client_fscrypt_as set to false
client_alternate_name_visible set to true

Steps a backup utility may take

create top level dir with provided dname (b64 encoded)
copy fscrypt.auth, fscrypt.file, alternate_name
create inodde with provided dname (b64 encoded)
copy data contents (could be actual data or symlink target)
copy fscrypt.auth, fscrypt.file, alternate_name


Related issues 2 (2 open — 0 closed)

Related to CephFS - Bug #83688: mds: "bad backtrace on directory inode" after failover due to an inode update dropping a pending backtraceFix Under ReviewVenky Shankar

Actions
Copied to CephFS - Backport #82846: umbrella: client: allow user to view and set alternate_nameIn ProgressChristopher Hoffman

Actions

CH Updated by Christopher Hoffman 4 months ago Actions #1

  • Status changed from New to In Progress

CH Updated by Christopher Hoffman 3 months ago Actions #2

  • Description updated (diff)

CH Updated by Christopher Hoffman 3 months ago Actions #3

  • Description updated (diff)

VS Updated by Venky Shankar 3 months ago Actions #4

  • Category set to Administration/Usability
  • Target version set to v22.0.0
  • Source set to Development
  • Backport set to umbrella
  • Component(FS) Client added
  • Labels (FS) fscrypt added

CH Updated by Christopher Hoffman 3 months ago Actions #5

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 71881

UB Updated by Upkeep Bot 27 days ago Actions #6

  • Copied to Backport #82846: umbrella: client: allow user to view and set alternate_name added

UB Updated by Upkeep Bot 27 days ago Actions #7

  • Status changed from Fix Under Review to Backporting
  • Merge Commit set to bfdca235443e37988d65d27618c170b408cd4966
  • Fixed In set to v22.0.0-539-gbfdca23544
  • Upkeep Timestamp set to 2026-11-06T05:08:40+00:00

VS Updated by Venky Shankar 3 days ago Actions #8

  • Related to Bug #83688: mds: "bad backtrace on directory inode" after failover due to an inode update dropping a pending backtrace added
Actions

Also available in: PDF Atom