Ethan Quach wrote: >>>> TI_ATTR_ZFS_SHARED_FS_[NUM|NAMES] >>>> - Originally, TI ZFS module didn't distinguish between shared and >>>> non-shared filesystems. Looking the the code, it seems to me that >>>> from TI point of view, there are two differences: >>>> >>>> * non-shared filesystem is created on >>>> <root_pool>/ROOT/<be_name>/<fs_name>, >>>> shared filesystem omits ROOT/<be_name> part. >>>> >>>> * since shared as well as non-shared filesystems needs to be mounted >>>> on <alt_root>/<fs_name> mount point, different "zfs mount" command >>>> needs to be used. >>>> >>>> Could you please let me know, if it this observation is correct ? >>> >>> That's correct. >> >> Since distinguishing between shared and non-shared file systems is BE >> specific and thus this logic is to be implemented in libbe, not in ZFS >> module, I think it might be better to use following set of attributes >> for describing BE target for TI purposes in order to avoid the situation >> when TI_ATTR_ZFS_FS_[NUM|NAMES] attributes are overloaded (used for both >> ZFS as well as BE targets). Complete set of BE attributes is listed - >> it is based on parameters passed to libbe be_create() function: >> >> >> attribute type description >> ------------------------------------------------------------------------- >> >> TI_ATTR_BE_RPOOL_NAME string name of root pool >> TI_ATTR_BE_NAME string BE name >> TI_ATTR_BE_FS_NUM uint16 number of non-shared >> datasets >> TI_ATTR_BE_FS_NAMES string array non-shared dataset names >> TI_ATTR_BE_SHARED_FS_NUM uint16 number of shared datasets >> TI_ATTR_BE_SHARED_FS_NAMES string array shared dataset names >> TI_ATTR_BE_PERSISTENT boolean_t set to B_TRUE for >> persistent BE > > > These attributes seem fine, although I'm not sure what the PERSISTENT > flag is. (We can discuss that off this thread though.)
To be honest, I am also not sure how PERSISTENT flag will be utilized - it is currently being passed as one of parameter to be_create() interface. > So did you > intend for these to be used for my putback into the preview2 release > or are you saying these are what we should change them to for the Spring > release when we have libbe? I am sorry for the confusion - I am fine with the fix for preview2 as it is right now, since libbe is not being delivered for preview2 - BE set of attributes above would be implemented in TI when libbe is available. [...] > >> >> >>> >>> However, the notion of separateness in a target's 'file systems' and >>> 'shared file >>> systems' may still be required in TI when creating a BE. >> >> To tell the truth, since all BE logic would go into libbe, could you >> please >> making this point more clear - why it might be necessary that TI has >> notion >> about how shared and non-shared BE filesystems are being created ? > > Because of the new BE design, shared and non-shared file systems > get created in different locations in the dataset hierarchy, and so > libbe needs to distinguish between them. It however, doesn't > determine which file systems are shared its own, hence expects > the caller to specify which ones are which. I see - I think I got it now - if I understand correctly, TI needs to distinguish between shared and non-shared BE filesystems (which is to be accomplished by having two separate BE set of attributes for shared and non-shared filesystems) in order to be able to pass this information to libbe. Might it be correct ? Thank you, Jan