FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 12-13-2007, 01:43 PM
Alasdair G Kergon
 
Default dm crypt: fix write endio

From: Milan Broz <mbroz@redhat.com>

Fix BIO_UPTODATE test for write io.

Cc: stable@kernel.org
Cc: dm-crypt@saout.de
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
---
drivers/md/dm-crypt.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

Index: linux-2.6.24-rc5/drivers/md/dm-crypt.c
================================================== =================
--- linux-2.6.24-rc5.orig/drivers/md/dm-crypt.c 2007-12-12 15:40:33.000000000 +0000
+++ linux-2.6.24-rc5/drivers/md/dm-crypt.c 2007-12-12 15:43:11.000000000 +0000
@@ -511,6 +511,9 @@ static void crypt_endio(struct bio *clon
struct crypt_config *cc = io->target->private;
unsigned read_io = bio_data_dir(clone) == READ;

+ if (unlikely(!bio_flagged(clone, BIO_UPTODATE) && !error))
+ error = -EIO;
+
/*
* free the processed pages
*/
@@ -519,10 +522,8 @@ static void crypt_endio(struct bio *clon
goto out;
}

- if (unlikely(!bio_flagged(clone, BIO_UPTODATE))) {
- error = -EIO;
+ if (unlikely(error))
goto out;
- }

bio_put(clone);
kcryptd_queue_crypt(io);

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 02-06-2008, 10:50 PM
Greg KH
 
Default dm crypt: fix write endio

2.6.23-stable review patch. If anyone has any objections, please let us know.
------------------
From: Milan Broz <mbroz@redhat.com>

patch adfe47702c4726b3e045f9f83178def02833be4c in mainline.

Fix BIO_UPTODATE test for write io.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
drivers/md/dm-crypt.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -515,6 +515,9 @@ static int crypt_endio(struct bio *clone
struct crypt_config *cc = io->target->private;
unsigned read_io = bio_data_dir(clone) == READ;

+ if (unlikely(!bio_flagged(clone, BIO_UPTODATE) && !error))
+ error = -EIO;
+
/*
* free the processed pages, even if
* it's only a partially completed write
@@ -529,10 +532,8 @@ static int crypt_endio(struct bio *clone
if (!read_io)
goto out;

- if (unlikely(!bio_flagged(clone, BIO_UPTODATE))) {
- error = -EIO;
+ if (unlikely(error))
goto out;
- }

bio_put(clone);
io->post_process = 1;

--

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 07:30 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org