Commit:     ad2d7225709b11da47e092634cbdf0591829ae9c
Parent:     be1c63411addba3ad750eb4fdfc50b97bc82825e
Author:     Mike Christie <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 1 10:40:20 2006 +0100
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Fri Dec 1 10:40:20 2006 +0100

    [PATCH] block: kill length alignment test in bio_map_user()
    The target mode support is mapping in bios using bio_map_user. The
    current targets do not need their len to be aligned with a queue limit
    so this check is causing some problems. Note: pointers passed into the
    kernel are properly aligned by usersapace tgt code so the uaddr check
    in bio_map_user is ok.
    The major user, blk_bio_map_user checks for the len before mapping
    so it is not affected by this patch.
    And the semi-newly added user blk_rq_map_user_iov has been failing
    out when the len is not aligned properly so maybe people have been
    good and not sending misaligned lens or that path is not used very
    often and this change will not be very dangerous. st and sg do not
    check the length and we have not seen any problem reports from those
    wider used paths so this patch should be fairly safe - for mm
    and wider testing at least.
    Signed-off-by: Mike Christie <[EMAIL PROTECTED]>
    Signed-off-by: FUJITA Tomonori <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
 fs/bio.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/bio.c b/fs/bio.c
index f95c874..d91cfbf 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -622,10 +622,9 @@ static struct bio *__bio_map_user_iov(re
                nr_pages += end - start;
-                * transfer and buffer must be aligned to at least hardsector
-                * size for now, in the future we can relax this restriction
+                * buffer must be aligned to at least hardsector size for now
-               if ((uaddr & queue_dma_alignment(q)) || (len & 
+               if (uaddr & queue_dma_alignment(q))
                        return ERR_PTR(-EINVAL);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to