Hi Andrew,
By making simple changes in XrdOss, I am able to begin streaming a
root file from my IBP depot into a root session via xrootd. I've
only swap'd the XrdOssApi.cc open(), read(), and fstat() operations
with my xio_open(), xio_read(), and xio_fstat(). However, I am now
stuck on stat operations which are confusing the size of my data
cache with the size of my index file describing this data cache.
Heres what I do: I have an index file "*.xnode" (like an inode). In
this case called mydatafile.root.xnd
xio_open(*.xnode) opens the xnode index file and finds the remote
data file.
xio_fstat(*.xnode) reports the size of the remote data file, not the
xnode index file itself
xio_stat(*.xnode) reports the size of the xnode index file itself,
not the remote data file.
xio_read(*.xnode) streams in the remote data file, not the xnode
index file.
however xrootd uses both fstat() and stat() redundantly or
interchangeable and assumes they are the same. (?? I think, I don't
know) is this correct? I don't understand how or why xrootd needs
to use both fstat and stat to retrieve the same information -- why
isn't the initial fstat operation sufficient? what more does a
subsequent stat operation provide? why aren't subsequent checks also
fstat?
Here's my error message. The interactive root session reports:
root [1] myfile = TFile::Open("root://vpac09//tmp/mydatafile.root.xnd");
Error in <TXNetFile::Init>: file root://vpac09//tmp/
mydatafile.root.xnd is truncated at 163670 bytes: should be
287599163, trying to recover
Warning in <TXNetFile::Init>: no keys recovered, file has been made a
Zombie
Error in <TXNetFile::CreateXClient>: open attempt failed on root://
vpac09//tmp/mydatafile.root.xnd
my index file /tmp/mydatafile.root.xnd is indeed 163670 bytes.
The size of the remote rootfile striped on the ibp depots is indeed
287599163 bytes.
xrootd is interpreting these to be the same.
in this example, xrootd calls
open()
isCompressed()
Fstat() ------ initial fstat correctly gets the size of the remote data
statbuff->st_size = 287599163
getMmap()
read() 2x
stat() ------- this gets the size of the *.xnode index file, not
the size of the remote data stream.
statbuff->st_size = 163670
read() 2x
close() ----- closing much too early!
Any general hints on modifying the stat usage would be helpful. It
looks like I need to keep digging deeper. I can't simply replace the
stat operations
with fstat, that produces an error. I need to figure out how these
numbers are later interpreted and change that.
thanks,
Dan
|