Whamcloud - gitweb
LU-9359 pfl: instantiate enough component at mdd_create_data 12/27312/2
authorBobi Jam <bobijam.xu@intel.com>
Tue, 18 Apr 2017 13:58:59 +0000 (21:58 +0800)
committerBobi Jam <bobijam@hotmail.com>
Sat, 27 May 2017 06:44:20 +0000 (06:44 +0000)
commit06a2433b8ee0a8448eeb0c71a0a38ebb0848685e
treee228778d97ccbbcd512eecc4588f71a920148508
parent150fe4b002df23275de4b49b97cb8e4a7f3cd6f0
LU-9359 pfl: instantiate enough component at mdd_create_data

mknod creates file without layout, then truncate trigger the MDT
create OST objects, while current implementation only instantiate the
1st component, and when the truncate size locates in the other
components, the lvb size info is lost.

This patch makes MDT creates enought OST objects to cover the file's
size.

This patch fixes the misunderstanding of ost_pool::op->size, it
indicates the buffer size allocated instead of the array count.

Another issue fixed is that in lod_alloc_qos(), only fill in the ost
inused array when the lod_qos_declare_object_on() succeeds.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ie66950e9b3d8cc009cca58f63936b275759211f1
Reviewed-on: https://review.whamcloud.com/26706
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
(cherry picked from commit 3a55e357715492cb195bfeb19ffa34d39f9c6926)
Reviewed-on: https://review.whamcloud.com/27312
lustre/lod/lod_internal.h
lustre/lod/lod_object.c
lustre/lod/lod_pool.c
lustre/lod/lod_qos.c
lustre/lov/lov_internal.h
lustre/lov/lov_io.c
lustre/lov/lov_pool.c
lustre/osc/osc_io.c