[lustre-discuss] llapi_file_open() messages to stderr

John Bauer bauerj at iodoctors.com
Sat Apr 30 11:44:37 PDT 2016


Thanks for the response.  There are other reasons I want to suppress 
these messages.

1) I am trying to minimize system calls.

2) It's kind of overkill for llapi_file_open() to print to stderr.  The 
function already returns -1 with errno=EEXIST. Shouldn't it be up to the 
caller to decide if a message should be printed.

3) There are other messages, different than the *stripe already set*,  
that I also would like to suppress.  Most notably "*Invalid argument*".  
I hate to think that I have to check validity of all the striping 
arguments to prevent the messages to stderr.  I'll also point that even 
*lfs setstripe* doesn't even go to the trouble to tell you which 
argument is invalid.

     % lfs setstripe -c 486 -i 45 file.dat
     error on ioctl 0x4008669a for 'file.dat' (3): Invalid argument
     error: setstripe: create stripe file 'file.dat' failed


On 4/30/2016 12:27 PM, Dennis Nelson wrote:
> Check for existing files before making the call?  And don't issue the 
> call if the file exists.  You cannot change stripe attributes on an 
> existing file.
> Sent from my iPhone
> On Apr 30, 2016, at 11:51 AM, John Bauer <bauerj at iodoctors.com 
> <mailto:bauerj at iodoctors.com>> wrote:
>> I am implementing the use of*llapi_file_open()* in my I/O library so 
>> I can set the striping.  If the file already exists I get the 
>> following message on stderr:
>> *error on ioctl 0x4008669a for 'dd.dat' (4): stripe already set*
>> Is there some way to suppress this message?  The end-uers of my 
>> library will get these messages in stderr of their job and will 
>> likely have no clue as to why.  My library detects the failed 
>> llapi_file_open() and retrys with open64() and spits out its own 
>> error message to the library's log.
>> Thanks
>> John
>> -- 
>> I/O Doctors, LLC
>> 507-766-0378
>> bauerj at iodoctors.com
>> _______________________________________________
>> lustre-discuss mailing list
>> lustre-discuss at lists.lustre.org <mailto:lustre-discuss at lists.lustre.org>
>> http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org

I/O Doctors, LLC
bauerj at iodoctors.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/attachments/20160430/8a2ab208/attachment.htm>

More information about the lustre-discuss mailing list