Whamcloud - gitweb
LU-9359 pfl: instantiate enough component at mdd_create_data 06/26706/5
authorBobi Jam <bobijam.xu@intel.com>
Tue, 18 Apr 2017 13:58:59 +0000 (21:58 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 1 May 2017 17:47:20 +0000 (17:47 +0000)
commit3a55e357715492cb195bfeb19ffa34d39f9c6926
treef555fc473ac93a18c46508cf989490981ae6861b
parent340ea262e728f2fab47c66876cbc372fa0e65aee
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>
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