Use the number of blocks in the DB. It is the one returned by stat(), which is always computed on a 512bytes basis (see man 2 stat).

So you just have to compare size and blocks*512 to detect sparse files.

Thomas

On 07/11/14 13:39, Michael Kluge wrote:
Hi List,

is the file system block size somewhere available in the robinhood db? We found that in the DB we have for each file the size (as reported by stat) and the number of blocks. If I have a sparse file, the first number is kind of wrong and the second useless without information about the block size. So the main question is: can I caclulate the allocated file size for a file by only looking at the robinhood DB?


Regards, Michael



------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft


_______________________________________________
robinhood-support mailing list
robinhood-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/robinhood-support

------------------------------------------------------------------------------
_______________________________________________
robinhood-support mailing list
robinhood-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/robinhood-support

Reply via email to