linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* freeze_bdev hangs
@ 2012-10-05 11:58 Prashant Shah
  2012-10-05 17:33 ` Eric Sandeen
  0 siblings, 1 reply; 11+ messages in thread
From: Prashant Shah @ 2012-10-05 11:58 UTC (permalink / raw)
  To: linux-ext4

Hi,

I am writing a filter driver for ext3 in which it replaces the block
device request queue 'make_request_fn' with the driver custom
function. Calling freeze_bdev() or freeze_super() before replacing the
'make_request_fn' hangs the kernel. What am I doing wrong ? Will this
method work ?

full code : https://gist.github.com/3839380

Snippet :

        sb = freeze_bdev(bd);
        if (sb)
                printk(KERN_INFO "filter: freez block device\n");

        if (bd->bd_disk->queue->make_request_fn == filter_mrqfn) {
                printk(KERN_INFO "filter: modules request function is
already active\n");
        } else {
                orig_mrqfn = bd->bd_disk->queue->make_request_fn;
                bd->bd_disk->queue->make_request_fn = filter_mrqfn;
        }
        thaw_bdev(bd, sb);

Please forgive my ignorance, I am a fresher in file systems :)

Regards.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-12-04 13:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-05 11:58 freeze_bdev hangs Prashant Shah
2012-10-05 17:33 ` Eric Sandeen
2012-10-08  7:43   ` Prashant Shah
2012-10-08 16:19     ` Jan Kara
2012-10-08 16:35       ` Prashant Shah
2012-10-09 21:49         ` Jan Kara
2012-10-12 16:08           ` Prashant Shah
2012-12-04 13:10             ` Prashant Shah
2012-10-08 18:21     ` Eric Sandeen
2012-10-08 18:48       ` Prashant Shah
2012-10-09  5:13         ` Prashant Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).