On Sat, May 31, 2014 at 11:48:09AM +0800, Liu Yuan wrote: > 1K is not suitable for some softwares like mkfs because it is operating on > sector size. > > With sbd inserted, > > # sbd0 mapped to an erasure coded vdi > $ mkfs.xfs -f /dev/sbd0 && xfs_check /dev/sbd0 > > will report error. Setting data strip as 512B solve the problem. This also > fixes the possible size problem in VM. > > Signed-off-by: Liu Yuan <[email protected]> > --- > include/fec.h | 12 ++---------- > 1 file changed, 2 insertions(+), 10 deletions(-) > > diff --git a/include/fec.h b/include/fec.h > index 0297f33..b3c6e55 100644 > --- a/include/fec.h > +++ b/include/fec.h > @@ -107,16 +107,8 @@ void fec_decode(const struct fec *code, > uint8_t *const *const outpkts, > const int *const index, size_t sz); > > -/* > - * data stripe <= 1K is the safe value to run VM after some experimentations. > - * > - * Though most OS's file system will operate on 4K block, some softwares like > - * grub will operate on 512 bytes and Linux kernel itself will sometimes > - * operate on 1K blocks. I have tried 4K alignement and centos6 installation > - * failed (grub got screwed) and 1K is probably the biggest value if we want > - * VM to run on erasure coded volume. > - */ > -#define SD_EC_DATA_STRIPE_SIZE (1024) /* 1K */ > +/* Set data stripe as sector size to make VM happy */ > +#define SD_EC_DATA_STRIPE_SIZE (512) /* 512 Byte */ > #define SD_EC_NR_STRIPE_PER_OBJECT (SD_DATA_OBJ_SIZE / > SD_EC_DATA_STRIPE_SIZE) > #define SD_EC_MAX_STRIP (16) > > -- > 1.8.1.2 >
Applied Yuan -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
