X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Flod%2Flod_dev.c;h=96d2ac9c13a0544d272168b1e22bbd36a47e0223;hp=3a9fdee8c61c9611665200d50a152bf02825eac8;hb=0de931bb0c66f397a0d9f4b66830cb1050015c9b;hpb=c09b59bb958f3e089b95dd9492cc1bef17cb3782 diff --git a/lustre/lod/lod_dev.c b/lustre/lod/lod_dev.c index 3a9fdee..96d2ac9 100644 --- a/lustre/lod/lod_dev.c +++ b/lustre/lod/lod_dev.c @@ -37,6 +37,56 @@ * Author: Alex Zhuravlev * Author: Mikhail Pershin */ +/** + * The Logical Object Device (LOD) layer manages access to striped + * objects (both regular files and directories). It implements the DT + * device and object APIs and is responsible for creating, storing, + * and loading striping information as an extended attribute of the + * underlying OSD object. LOD is the server side analog of the LOV and + * LMV layers on the client side. + * + * Metadata LU object stack (layers of the same compound LU object, + * all have the same FID): + * + * MDT + * | MD API + * MDD + * | DT API + * LOD + * / \ DT API + * OSD OSP + * + * During LOD object initialization the localness or remoteness of the + * object FID dictates the choice between OSD and OSP. + * + * An LOD object (file or directory) with N stripes (each has a + * different FID): + * + * LOD + * | + * +---+---+---+...+ + * | | | | | + * S0 S1 S2 S3 S(N-1) OS[DP] objects, seen as DT objects by LOD + * + * When upper layers must access an object's stripes (which are + * themselves OST or MDT LU objects) LOD finds these objects by their + * FIDs and stores them as an array of DT object pointers on the + * object. Declarations and operations on LOD objects are received by + * LOD (as DT object operations) and performed on the underlying + * OS[DP] object and (as needed) on the stripes. From the perspective + * of LOD, a stripe-less file (created by mknod() or open with + * O_LOV_DELAY_CREATE) is an object which does not yet have stripes, + * while a non-striped directory (created by mkdir()) is an object + * which will never have stripes. + * + * The LOD layer also implements a small subset of the OBD device API + * to support MDT stack initialization and finalization (an MDD device + * connects and disconnects itself to and from the underlying LOD + * device), and pool management. In turn LOD uses the OBD device API + * to connect it self to the underlying OSD, and to connect itself to + * OSP devices representing the MDTs and OSTs that bear the stripes of + * its objects. + */ #define DEBUG_SUBSYSTEM S_MDS