Re: FW: Areca controller problem with Linux XFS over DM-CRYPT

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

 



Milan Broz <mbroz@...> writes:

> 
> someone wrote:
> >> please could you try to use patch attached in previous mail and report if 
it 
> > helps ?
> 
> > I'm currently using 2.6.22-r9 (Gentoo) but I could probably unmask 2.6.24 
if 
> > that's required for the patch. What's the oldest kernel version I could 
test 
> > the patch on?
> 
> Patch can be applied to 2.6.22 without change, the bug is in dm-crypt for 
long time...
> 
> Milan
> --
> mbroz@...
> 
> 

I tried... still the same issue. This is my dm-crypt.c patched:

/*
 * Generate a new unfragmented bio with the given size
 * This should never violate the device limitations
 * May return a smaller bio when running out of pages
 */
static struct bio *crypt_alloc_buffer(struct crypt_io *io, unsigned int size)
{
        struct crypt_config *cc = io->target->private;
        struct bio *clone;
        unsigned int nr_iovecs = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
        gfp_t gfp_mask = GFP_NOIO | __GFP_HIGHMEM;
        unsigned int i;
        struct page *page;
        unsigned long len;

        clone = bio_alloc_bioset(GFP_NOIO, nr_iovecs, cc->bs);
        if (!clone)
                return NULL;

        clone_init(io, clone);

        for (i = 0; i < nr_iovecs; i++) {
                page = mempool_alloc(cc->page_pool, gfp_mask);
                if (!page)
                        break;

                /*
                 * if additional pages cannot be allocated without waiting,
                 * return a partially allocated bio, the caller will then try
                 * to allocate additional bios while submitting this partial 
bio
                 */
                if (i == (MIN_BIO_PAGES - 1))
                        gfp_mask = (gfp_mask | __GFP_NOWARN) & ~__GFP_WAIT;

                len = (size > PAGE_SIZE) ? PAGE_SIZE : size;

                if (!bio_add_page(clone, page, len, 0)) {
                        mempool_free(page, cc->page_pool);
                        break;
                }

                size -= len;
        }

        if (!clone->bi_size) {
                bio_put(clone);
                return NULL;
        }

        return clone;
}

Just wanted to doublecheck to make sure it's correct...

~ # cryptsetup luksOpen /dev/sda1 raid
Enter LUKS passphrase:
key slot 0 unlocked.
Command successful.
~ # dd if=/dev/urandom of=/dev/mapper/raid

even that will make my array go offline... any suggestions or other things to 
try?

I can fully format/use the volume without dm-crypt but nothing seems to work 
at all with dm-crypt.


---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux