Project

General

Profile

Actions

Cleanup #1499

closed

mds: clean up directory layouts

Added by Sage Weil over 12 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Component(FS):
Labels (FS):
Pull request ID:

Description

Rip out all the default_layout stuff and just stick this in the inode_t::layout value. This should remove a lot of annoying code.

Actions #1

Updated by Sage Weil over 12 years ago

  • Translation missing: en.field_position set to 1
  • Translation missing: en.field_position changed from 1 to 896
Actions #2

Updated by Sage Weil over 12 years ago

  • Target version changed from v0.36 to v0.37
Actions #3

Updated by Sage Weil over 12 years ago

  • Target version deleted (v0.37)
Actions #4

Updated by Sage Weil over 11 years ago

  • Project changed from Ceph to CephFS
  • Category deleted (1)
Actions #5

Updated by Sage Weil over 11 years ago

  • Translation missing: en.field_position deleted (1317)
  • Translation missing: en.field_position set to 1
Actions #6

Updated by Sage Weil over 11 years ago

  • Translation missing: en.field_story_points set to 5
  • Translation missing: en.field_position deleted (15)
  • Translation missing: en.field_position set to 15
Actions #7

Updated by Sage Weil over 11 years ago

  • Translation missing: en.field_position deleted (21)
  • Translation missing: en.field_position set to 3
Actions #8

Updated by Sage Weil over 11 years ago

  • Translation missing: en.field_position deleted (5)
  • Translation missing: en.field_position set to 20
Actions #9

Updated by Sage Weil over 11 years ago

  • Translation missing: en.field_position deleted (20)
  • Translation missing: en.field_position set to 19
Actions #10

Updated by Greg Farnum over 11 years ago

  • Translation missing: en.field_story_points deleted (5)
  • Translation missing: en.field_position deleted (22)
  • Translation missing: en.field_position set to 22
Actions #11

Updated by Sage Weil about 11 years ago

there is an old branch that does this. note that this code changed with the wip-vxattrs work, so the rebase needs to be done carefully.

Actions #12

Updated by Ian Colle about 11 years ago

  • Translation missing: en.field_story_points set to 5
  • Translation missing: en.field_position deleted (22)
  • Translation missing: en.field_position set to 10
Actions #13

Updated by Greg Farnum about 11 years ago

I've rebased on top of the wip-mds-encode-rebased branch as wip-1499-mds-layouts, although I notice it's failing some of the dencoder tests so it's not perfect yet. (Also there's a FIXME to add a member function instead of doing the test inline.)

Actions #14

Updated by Greg Farnum about 11 years ago

  • Target version set to v0.59
Actions #15

Updated by Greg Farnum about 11 years ago

  • Status changed from New to Fix Under Review

Okay, this patch is required to fix the loss of directory layouts issue (#1435) in Bobtail, so I rebased it on that branch, currently in bobtail-layouts.
I then cherry-picked it forward to next, in greg-next.

Yes, this is backwards from normal, but unfortunately the change to using in-inode layouts requires a struct_v change, and those numbers conflict with the mds encoding changes that went into master (and next) recently, so the best solution I or Sage came up with was to let bobtail take the next numbers, and then to pretend like the first revision of the MDS encoding struct_v changes didn't happen (because they were never released).

Needless to say, this all needs a very careful review. Perhaps from more than one person.

Actions #16

Updated by Greg Farnum about 11 years ago

  • Status changed from Fix Under Review to Resolved

Okay, I tested this according to the procedure described below (I wanted to write some scripts, but the non-manual portions of it were only a few lines at a time right now, meh).

It worked, so I've pushed to bobtail (commit:36ed407e0f939a9bca57c3ffc0ee5608d50ab7ed) and next (commit:6bd8781dda524f04bb56bcdac5aa5b13ba61b07d).

Run with bobtail
Set mds_log_max_segments and mds_log_max_expiring to 1, mds_cache_size to 100, then (re)start MDSSet layout on root inode, on child directory "idle_test/dir_with_layout", and on child directory "active_test" (all differently)
drop caches
run pjd test inside of "active_test"
check MDS log to see that idle_test/dir_with_layout was removed from cache, and see that MDS log has expired early segments
upgrade MDS to bobtail-layouts, restart
verify it runs and layouts are present on active_test, missing on idle_test/dir_with_layout
re-apply layouts, run pjd in active_tests
upgrade MDS to greg-next, restart
verify it runs and layouts are correct
repeat with a direct upgrade from bobtail to greg-next and make sure it runs

Actions

Also available in: Atom PDF