Re: SG does not ignore dxferp (direct io + mmap)

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

 



Same problem on Fedora 23

$ uname -r
4.7.10-100.fc23.x86_64

$ sudo ./sg_mmap_read -d /dev/sg0 -l 0 | od -t x1
0000000 eb 63 90 10 8e d0 bc 00 b0 b8 00 00 8e d8 8e c0
...

$ sudo ./sg_mmap_read -d /dev/sg0 -l 0 -m | od -t x1
0000000 eb 63 90 10 8e d0 bc 00 b0 b8 00 00 8e d8 8e c0
...

$ sudo ./sg_mmap_read -d /dev/sg0 -l 0 -m -b | od -t x1
0000000 00 63 90 10 8e d0 bc 00 b0 b8 00 00 8e d8 8e c0
...

2016-11-22 10:37 GMT+02:00 Johannes Thumshirn <jthumshirn@xxxxxxx>:
> On Mon, Nov 21, 2016 at 01:24:02PM -0500, Ewan Milne wrote:
>> On Mon, 2016-11-21 at 12:34 -0500, Douglas Gilbert wrote:
>> > There was also this change which seems closer to the problem area:
>> >
>> > commit 461c7fa126794157484dca48e88effa4963e3af3
>> > Author: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
>> > Date:   Tue Feb 2 16:57:35 2016 -0800
>> >
>> >      drivers/scsi/sg.c: mark VMA as VM_IO to prevent migration
>> > ...
>> >
>> > diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
>> > index 503ab8b..5e82067 100644
>> > --- a/drivers/scsi/sg.c
>> > +++ b/drivers/scsi/sg.c
>> > @@ -1261,7 +1261,7 @@ sg_mmap(struct file *filp, struct vm_area_struct *vma)
>> >          }
>> >
>> >          sfp->mmap_called = 1;
>> > -       vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
>> > +       vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP;
>> >          vma->vm_private_data = sfp;
>> >          vma->vm_ops = &sg_mmap_vm_ops;
>> >          return 0;
>> >
>> > Doug Gilbert
>> >
>>
>> Neither this change nor "sg: fix dxferp in from_to case" appears to
>> fix the issue when applied on top of 4.4.  Still looking...
>
> This brings bad memories from commit 2d99b55d3 back to live, but this is
> applied on all test kernels I have.
>
> I too will run some bisection as well now that we have an easy reproducer and
> my timezone is somewhat ahead. Let's see if we can stretch the workday a bit.
>
> Byte,
>         Johannes
>
> --
> Johannes Thumshirn                                          Storage
> jthumshirn@xxxxxxx                                +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: Felix Imendörffer, Jane Smithard, Graham Norton
> HRB 21284 (AG Nürnberg)
> Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux