[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] How to block IO coming from filesystem while mapping bh?



Hello,

I want to block IO coming from filesystem while mapping bh. If the MD is
read and written as a file (like dd if=/dev/zero of=/dev/mapper/vd0
..), we can override the ops->read() and ops->write() of the MD
(/dev/mapper/vd0), and block the reading and writing properly. But if we 
make a filesystem on the MD and read/write through the filesystem I do 
not know how to achieve this.

There is a function named __lock_fs() in dm.c in kernel-2.6.6, which calls
the function of freeze_bdev() in buffer.c. I have two questions about
these functions:

1. If __lock_fs() can block all current reading and writing coming from the 
filesystem based on the MD which we controlled?

2. If there is any similar function can be called by MD in kernel-2.4.*?
How can we block all current reading and writing coming from the filesystem 
based on the MD? As I know, dm_suspend() in dm.c can defer the IO, but can 
not block it.

Thanks!
Ji Haitao


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]