public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Help tracking down problem --- endless loop in __find_get_block_slow
@ 2005-02-21 10:46 Thomas S. Iversen
  2005-02-22  9:18 ` Andrew Morton
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas S. Iversen @ 2005-02-21 10:46 UTC (permalink / raw)
  To: device-mapper development, linux-kernel

Hi There

I am trying to develop a device mapper plugin which does transparent 
block encryption and sector shuffling in the style freebsd does it (GBDE)

Reads are support and working, but have trouble getting writes to work 
properly.

If I do a simple:

echo "test" > /mnt/test (where /mnt is /dev/mapper/gbde)
sync

it works just fine. If I do

dd if=/dev/zero of=/mnt/testfile count=N, N=1..6 it works fine

But if I do

dd if=/dev/zero of=/mnt/testfile count=N, N>6

I get into an endless loop in __find_get_block_slow. My write path does 
something like this:

recieve original BIO (eg. size=4096). Split BIO into sectorsize chunks.
map chunks to physical sectors.
encrypt sectors
generate keys
write sectors
update keysectors
... when all sectors are written call bio_endio on the original request.

To awoid allocating alot of pages during writes, I use the mem from the 
original request to do encryption "inplace". Could that be the cause of 
my problems? I would clearly like to minimize the need for page 
allocation in my dm-module, so I hope it isn't.

Whats going on here? Every comments appriciated!

Regards Thomas

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

end of thread, other threads:[~2005-02-28 21:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-21 10:46 Help tracking down problem --- endless loop in __find_get_block_slow Thomas S. Iversen
2005-02-22  9:18 ` Andrew Morton
2005-02-22 22:46   ` Jeff Mahoney
2005-02-22 23:28     ` Andrew Morton
2005-02-26  0:03       ` Jeff Mahoney
2005-02-28 21:06         ` Jeff Mahoney
2005-02-28 21:09         ` Help tracking down problem --- endless loop in __find_get_block_slow (now with the patch) Jeff Mahoney
2005-02-23 12:00   ` Help tracking down problem --- endless loop in __find_get_block_slow Thomas S. Iversen
2005-02-23 12:10     ` Andrew Morton
2005-02-23 13:02       ` Thomas S. Iversen
2005-02-23 20:09         ` Andrew Morton
2005-02-23 22:24           ` Thomas S. Iversen
2005-02-23 23:17             ` Andrew Morton
2005-02-24  8:54               ` Thomas S. Iversen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox