From 34c6bb9dce43f0f418f03a517b846a27e128a268 Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 12 Nov 2002 18:50:19 +0000 Subject: [PATCH] Widesweeping change to support different-sized LOV MD data (b=307,345, and partially 314). The goal is to remove all knowledge of MD data from llite and the MDS, and keep it solely inside OSC and LOV. The change is not entirely complete (for enh 314) in that we still pass "struct lov_stripe_md" and "struct lov_mds_md" structs around, but that was mostly for sanity to avoid getting the two screwed up during this large amount of change. OSC passes runtests, and LOV has a _huge_ bug in it that dies after a single file copy+cleanup, so that's why it's on a branch. This adds two new OBD API methods (I'm not totally stuck on the names yet): - o_packmd to alloc/pack/free data for wire transport and storage on disk - o_unpackmd to alloc/pack/free data for in-memory and storage on disk There are helper functions obd_{alloc,size,free}_{mem,wire}md() which call the above two OBD API methods with the correct parameters to just allocate or size or free an MD. This totally isolates anything outside LOV/OSC from knowing anything of the internals of the MD data struct, and lays the groundwork for LOV stacking in the future. The user-space LOV striping setup has also changed slightly to use the "MDS/wire/disk" MD format for communication instead of the in-memory MD format, and the lovstripe.c test, utils/lfind.c and new utils/lstripe.c program (formerly makestripe.c from Kevin Harlan) have been updated to use this new interface. The lstripe.c utility allows easy creation of files with a specific striping pattern. --- lustre/llite/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 4384208..1d51460 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -129,7 +129,7 @@ struct address_space_operations ll_dir_aops = { prepare_write: ll_dir_prepare_write }; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,3)) int waitfor_one_page(struct page *page) { int error = 0; @@ -143,7 +143,7 @@ int waitfor_one_page(struct page *page) } while ((bh = bh->b_this_page) != head); return error; } -#else +#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) int waitfor_one_page(struct page *page) { wait_on_page_locked(page); -- 1.8.3.1