Project

General

Profile

Feature #48791

mds: support file block size

Added by Patrick Donnelly about 3 years ago. Updated almost 3 years ago.

Status:
Rejected
Priority:
Urgent
Assignee:
-
Category:
-
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
Reviewed:
Affected Versions:
Component(FS):
MDS, kceph
Labels (FS):
Pull request ID:

Description

The new fscrypt feature in the kernel client that is under development needs to be able to prevent the MDS from truncating encrypted data that lies beyond the file's st_size. st_size is still used for keeping track of the size of the file and is passed unmodified to the application. However, the encrypted data may go beyond that up to the block size used by fscrypt (4k I believe).

Introduce a concept of a block size for CephFS files which the MDS uses for the purposes of truncating file data (or for COW in the future). The MDS will always round up to the nearest block size when performing a truncate.

History

#1 Updated by Jeff Layton about 3 years ago

Technically, I think the blocksize can be anything >= 8 bytes or so. Too small or large a block will be cumbersome to work with however. A block that aligns with a (typical) page size of 4k seems like a good compromise.

Also, we probably will only want to round up the truncation point for encrypted inodes. We'll want to leave cleartext inodes intact.

#2 Updated by Patrick Donnelly about 3 years ago

  • Status changed from New to Need More Info
  • Assignee deleted (Patrick Donnelly)
  • Target version changed from v16.0.0 to v17.0.0

#3 Updated by Patrick Donnelly almost 3 years ago

  • Status changed from Need More Info to Rejected

Discussions over email indicate we'll be going in another direction.

Also available in: Atom PDF