You can open files with O_LOV_DELAY_CREATE to delay layout assignment, and then use ioctl(fd, LL_IOC_LOV_SETSTRIPE, lum) to specify the striping afterward, but this misses a lot of the error checking and other layout handling in llapi_file_open() and friends.
We haven't had a request for llapi_fd_set_stripe() and/or llapi_layout_fd_set() or similar, but I can see that this would be useful. Could you please file an improvement request for this in Jira. Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel High Performance Data Division On 2016/05/03, 06:23, "John Bauer" <[email protected]<mailto:[email protected]>> wrote: Has any there been any discussion as to allowing a user to modify the striping of a file until the first extent is made? There are a lot of opens that can not be easily replaced with llapi_file_open(), such as openat() family, mkstemp() family, and fopen() family. It seems that it should be feasible to change the file's striping even after the file is created but not written to. It would be really handy to have a function llapi_fd_set_stripe( int fd, ... ) to set the striping for a file that has been opened but not written to. I have gotten past my immediate need for setting the striping of a file opened with fopen64() by doing the llapi_file_open() and then using the resulting fd in fdopen(). But this approach is not applicable to all listed above. Thanks, John -- I/O Doctors, LLC 507-766-0378 [email protected]<mailto:[email protected]> _______________________________________________ lustre-discuss mailing list [email protected] http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org
