Print

Print


Follow-up Comment #3, sr #135998 (project xrootd):

Hi!
Indeed there is a way with stat(): having done

int result = stat64(fileName, &buf);  

while buf.st_size is in both cases the real size, buf.st_blocks is 0 if the
file is only on tape, a reasonable >0 number otherwise.

for example, please see attached a test program i did yesterday. It correctly
returns 0 if the file is on disk, 2 otherwise.

So option #1 seems viable, and i would be happy to test it with some help
about where to plug in the code.

A side question, still: the idea is to make cmsd aware of the disk state of
the file. But, if we modify oss.Stat, what happens if one requires the file
directly to the xrootd server sitting on GPFS (not via aredirector?)? I see
two possibilities:
#1: it still says the file is not there, as cmsd
#2: being a direct call, it tries to open it triggering the recall
I am not sure which is desired behavior, i think we can cope with both, but
it should be clear upfront  what to expect...
Thanks for the moment

tom

(file #32118)
    _______________________________________________________

Additional Item Attachment:

File name: returnStateOnDisk.c            Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.cern.ch/support/?135998>

_______________________________________________
  Message sent via/by LCG Savannah
  http://savannah.cern.ch/

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1