-
Ned Bass authored
Add a new set of llapi routines for interacting with file layouts that hide the details of the wire-protocol data structures from the user. Define an opaque struct llapi_layout to abstract the layout of a lustre file and generic accessor functions to read and write it. The following documented functions are added the liblustreapi public interface with accompanying man pages: llapi_layout_alloc - allocate a new layout llapi_layout_free - free memory allocated for a layout llapi_layout_file_create - create new file with given layout llapi_layout_file_open - open or create a file with given layout llapi_layout_get_by_path - get file layout given a path llapi_layout_get_by_fd - get file layout given a file descriptor llapi_layout_get_by_fid - get file layout given a Lustre FID llapi_layout_ost_index_get - get OST index associated with a stripe llapi_layout_ost_index_set - set OST index associated with a stripe llapi_layout_pattern_get - get RAID pattern of a layout llapi_layout_pattern_set - set RAID pattern of a layout llapi_layout_pool_name_get - get pool name of a layout llapi_layout_pool_name_set - set pool name of a layout llapi_layout_stripe_count_get - get stripe count of a layout llapi_layout_stripe_count_set - set stripe count of a layout llapi_layout_stripe_size_get - get stripe size of a layout llapi_layout_stripe_size_set - set stripe size of a layout The layouts are read and written using fgetxattr() and fsetxattr() instead of ioctl() to make it easier for architectures like Blue Gene to function-ship the system calls. Signed-off-by:
Ned Bass <bass6@llnl.gov> Signed-off-by:
James Simmons <uja.ornl@gmail.com> Change-Id: I35fb51055b6438ef3090f43c28a4083a66eaa907 Reviewed-on: http://review.whamcloud.com/5302 Tested-by: Jenkins Tested-by:
Maloo <hpdd-maloo@intel.com> Reviewed-by:
John L. Hammond <john.hammond@intel.com> Reviewed-by:
Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by:
Oleg Drokin <oleg.drokin@intel.com>
Ned Bass authoredAdd a new set of llapi routines for interacting with file layouts that hide the details of the wire-protocol data structures from the user. Define an opaque struct llapi_layout to abstract the layout of a lustre file and generic accessor functions to read and write it. The following documented functions are added the liblustreapi public interface with accompanying man pages: llapi_layout_alloc - allocate a new layout llapi_layout_free - free memory allocated for a layout llapi_layout_file_create - create new file with given layout llapi_layout_file_open - open or create a file with given layout llapi_layout_get_by_path - get file layout given a path llapi_layout_get_by_fd - get file layout given a file descriptor llapi_layout_get_by_fid - get file layout given a Lustre FID llapi_layout_ost_index_get - get OST index associated with a stripe llapi_layout_ost_index_set - set OST index associated with a stripe llapi_layout_pattern_get - get RAID pattern of a layout llapi_layout_pattern_set - set RAID pattern of a layout llapi_layout_pool_name_get - get pool name of a layout llapi_layout_pool_name_set - set pool name of a layout llapi_layout_stripe_count_get - get stripe count of a layout llapi_layout_stripe_count_set - set stripe count of a layout llapi_layout_stripe_size_get - get stripe size of a layout llapi_layout_stripe_size_set - set stripe size of a layout The layouts are read and written using fgetxattr() and fsetxattr() instead of ioctl() to make it easier for architectures like Blue Gene to function-ship the system calls. Signed-off-by:
Ned Bass <bass6@llnl.gov> Signed-off-by:
James Simmons <uja.ornl@gmail.com> Change-Id: I35fb51055b6438ef3090f43c28a4083a66eaa907 Reviewed-on: http://review.whamcloud.com/5302 Tested-by: Jenkins Tested-by:
Maloo <hpdd-maloo@intel.com> Reviewed-by:
John L. Hammond <john.hammond@intel.com> Reviewed-by:
Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by:
Oleg Drokin <oleg.drokin@intel.com>