It is possible to register an error message handler:

    llapi_log_callback_t llapi_error_callback_set(llapi_log_callback_t cb)
    llapi_log_callback_t llapi_info_callback_set(llapi_log_callback_t cb)

Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel High Performance Data Division

On 2016/04/30, 12:44, "lustre-discuss on behalf of John Bauer" 
<lustre-discuss-boun...@lists.lustre.org<mailto:lustre-discuss-boun...@lists.lustre.org>
 on behalf of bau...@iodoctors.com<mailto:bau...@iodoctors.com>> wrote:


Dennis

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
    %

John

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 
<<mailto:bau...@iodoctors.com>bau...@iodoctors.com<mailto:bau...@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
bau...@iodoctors.com<mailto:bau...@iodoctors.com>

_______________________________________________
lustre-discuss mailing list
lustre-discuss@lists.lustre.org<mailto:lustre-discuss@lists.lustre.org>
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org


--
I/O Doctors, LLC
507-766-0378
bau...@iodoctors.com<mailto:bau...@iodoctors.com>
_______________________________________________
lustre-discuss mailing list
lustre-discuss@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org

Reply via email to