[LU-5523] support stripe_index in default LMV stripeEA Created: 20/Aug/14 Updated: 05/Jun/15 Resolved: 05/Jun/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Di Wang | Assignee: | Di Wang |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | easy | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 15381 | ||||||||
| Description |
|
Currently only default stripe count is supported in striped directory, which is landed on 2.6. We should also support default stripe index, so the subdirectories will be created at the MDT indicated by default stripe index, similar as default stripe index for files. And if the default stripe_index is -1, it will choose MDT evenly among all of MDTs. |
| Comments |
| Comment by Andreas Dilger [ 08/Dec/14 ] |
|
The implementation of selecting a specific MDT should be a fairly simple patch. Selecting a "good" MDT based on index -1 is probably a significant feature and should be developed as a separate patch. |
| Comment by Di Wang [ 08/Dec/14 ] |
|
The current implementation requires client to create master object FID on the client side, if we want to support default stripe index, it means client needs to cache these default stripe EA, i.e. it needs to retrieve default stripe EA in every getattr, if the directory also has stripeEA, then it needs to get 2 EA in the normal lookup(getattr) path. I am not sure how to do that yet, 1 RPC with 2 EAs or 2 RPCs. And also there might be some incompatibility issue. Another problem is that if we cache default stripeEA, there might also involve some lock cancellation work here, i.e. if the server change the default stripe, client needs to cancel the default stripe. |
| Comment by Andreas Dilger [ 09/Dec/14 ] |
|
The client will already fetch and cache xattrs with the xattr_cache feature since 2.5 or so. I'm not sure if the current xattr cache will cache for directories. |
| Comment by Di Wang [ 12/Jan/15 ] |
|
Another thing needs to be noted is that, when resetting the default EA, the server needs to revoke both LOOKUP and UPDATE lock, so client will rebuild the inode cache and re-get the default stripeEA. |
| Comment by Gerrit Updater [ 13/Jan/15 ] |
|
wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/13360 |
| Comment by Andreas Dilger [ 04/Feb/15 ] |
|
What is the protocol compatibility impact of this patch? Will it break compatibility with older MDS if a new client tries to use this, or vice versa? |
| Comment by Di Wang [ 04/Feb/15 ] |
|
For old client/new server, the client might send create req to the wrong MDT, then server return -ERESTART, but the old client can not handle it, i.e. it will return -ERESTART to application, which might remind the customer to upgrade their old client to the new client? But considering default striped dir is rare case, it is probably fine? For new client/old server, I think client will be able to set the default stripe (index) for the directory. But the old server will not check this, i.e. default stripe index will not be honored, which is fine as well, IMHO. |
| Comment by Gerrit Updater [ 11/Feb/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13360/ |