Martin Jambor writes: > Thank you very much for your reply. > > On Mar 30, 2005 3:55 PM, Nikita Danilov <[EMAIL PROTECTED]> wrote: > > > 1. What is bmap for and what is it supposed to do? > > > > ->bmap() maps logical block offset within "object" to physical block > > number. It is used in few places, notably in the implementation of > > FIBMAP ioctl. > > We are about to start implementing a fs where data can move around the > device and so a physical block address is not really useful. I have > understood from other postings to this list that reiserfs and ntfs > don;t implement this method so I suppose we'll do the same. I'll just > find some nice error to return.
Consider tools like LILO that want stable block numbers for certain files. In reiserfs (both v3 and v4) there is an ioctl that disables relocation for a given file. Besides, I do not think ->bmap() is useless even when block numbers are volatile, for one thing it allows user level to track how file is laid out (for example, to measure fragmentation). [...] > > OK, so if I understand it well, sync_page does not actually write the > page anywhere, it only waits until the device driver finishes all > previous requests with that page, right? Does block_sync_page do No. ->sync_page() doesn't wait for anything. It simply tells to the underlying storage layer "start executing all queued IO requests". If your file system uses block device as a storage, use block_sync_page as your ->sync_page() method. > exactly that? (I would read the source but all it does is that it > calls a callback function) BTW, does it wait also for metadata? No difference between data and meta-data at this level. > > Martin Nikita. - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html