How to determine if a block is busy in Linux using an ioctl call?

On Linux, we can call the FIBMAP () ioctl to determine which blocks are stored in the filesystem.

I am wondering how I can tell if any random block is occupied by a file (or any data). Is there an ioctl to do this, or do I just need lseek

to block and see if data has been written or not? If there is a simple ioctl call to determine if a block is busy, that would be ideal.

+3


source to share





All Articles