Project

General

Profile

Feature #185

mds: set file layout policy on directory hierarchy

Added by Alex Nelson almost 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
06/07/2010
Due date:
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

It woud be helpful to have a way to specify multiple files' object sizes. Currently there is an ioctl for controlling individual file block sizes. However, there is nothing for setting object size between global scope (tweaking config.cc's g_default_file_layout) and individual file. It may make sense to specify this for an entire directory at a time, e.g. with an xattr.

Example use case: I am presently evaluating Hadoop with Ceph as a base file system. Sage noted the state of block size specifying to me, and suggested xattr may be the way to go.

History

#1 Updated by Alex Nelson almost 9 years ago

One complication that may arise: If directory xattrs are what are used, what would be the semantics of a file hard-linked under directories with different object sizes specified?

#2 Updated by Sage Weil almost 9 years ago

Alex Nelson wrote:

One complication that may arise: If directory xattrs are what are used, what would be the semantics of a file hard-linked under directories with different object sizes specified?

The striping parameters (incl object size) are set on file creation, at which point there is only one link.

#3 Updated by Sage Weil almost 9 years ago

If we use an xattr for this, one issue will be keeping the ancestor directly policy consistent across any mds node managing a subtree nested beneath that point. We probably don't want to require that all parent xattrs be readable in order to create new files.

Make xattrs aggressively rereplicated across nodes after update? Or, just use xattrs as interface, but manage the "policy" separately and aggressively replicate that across nodes?

#4 Updated by Sage Weil almost 9 years ago

  • Target version set to v0.22

#5 Updated by Sage Weil over 8 years ago

  • Subject changed from Support multi-file object size adjustment to mds: set file layout policy on directory hierarchy

#6 Updated by Sage Weil over 8 years ago

  • Assignee set to Greg Farnum

#7 Updated by Greg Farnum over 8 years ago

  • Status changed from New to Feedback

Pushed server-side code to branch file_layouts. Compiled, not tested due to current lack of message-sending interface.

#8 Updated by Greg Farnum over 8 years ago

  • Status changed from Feedback to In Progress

Going to branch the kclient too and write an ioctl plus a program to call it.

#9 Updated by Greg Farnum over 8 years ago

  • Status changed from In Progress to Feedback

Wrote the ioctl and updated test_ioctls to test it, then debugged issues with it. Still don't have any kind of ceph-manager tool or whatever, but I think that should be a separate issue.
In ceph commit:65b69f065ae755256d3abbbfd5d633e36cd3439b and ceph-client commit:9c448f311320827831daca99876ad4a7b419f70b
(these are just the file_layouts branches)

#10 Updated by Greg Farnum over 8 years ago

  • Status changed from Feedback to Resolved

Pushed in 7aab70ddc464355f068a143ea0e972183c155f24 (userspace) and commit:f670ee7872e51842e817e1606539e3c72e4b31b7 (kernel).

Also available in: Atom PDF