Re: [systemd-devel] How to stop systemd-udevd reading a device after dd

2017-11-12 Thread Andrei Borzenkov
24.10.2017 11:33, Lennart Poettering пишет: > On Fr, 13.10.17 01:01, Akira Hayakawa (ruby.w...@gmail.com) wrote: > >> I have a device /dev/sdb1 and let's trace the block request by blktrace >> >> $ sudo blktrace -d /dev/sdb1 >> >> When I write 4KB using dd >> $ sudo dd if=/dev/zero of=/dev/sdb1 of

Re: [systemd-devel] How to stop systemd-udevd reading a device after dd

2017-10-26 Thread Lennart Poettering
On Do, 26.10.17 15:31, Mantas Mikulėnas (graw...@gmail.com) wrote: > On Tue, Oct 24, 2017 at 11:33 AM, Lennart Poettering > wrote: > > > On Fr, 13.10.17 08:06, Mantas Mikulėnas (graw...@gmail.com) wrote: > > > > > gparted seems to achieve this by masking all .rules files it can find (by > > > cr

Re: [systemd-devel] How to stop systemd-udevd reading a device after dd

2017-10-26 Thread Mantas Mikulėnas
On Tue, Oct 24, 2017 at 11:33 AM, Lennart Poettering wrote: > On Fr, 13.10.17 08:06, Mantas Mikulėnas (graw...@gmail.com) wrote: > > > gparted seems to achieve this by masking all .rules files it can find (by > > creating 0-byte versions under /run/udev/rules.d). > > Urks. > > Somebody should tel

Re: [systemd-devel] How to stop systemd-udevd reading a device after dd

2017-10-24 Thread Lennart Poettering
On Fr, 13.10.17 08:06, Mantas Mikulėnas (graw...@gmail.com) wrote: > gparted seems to achieve this by masking all .rules files it can find (by > creating 0-byte versions under /run/udev/rules.d). Urks. Somebody should tell them about BSD file locks. Lennart -- Lennart Poettering, Red Hat

Re: [systemd-devel] How to stop systemd-udevd reading a device after dd

2017-10-24 Thread Lennart Poettering
On Fr, 13.10.17 01:01, Akira Hayakawa (ruby.w...@gmail.com) wrote: > I have a device /dev/sdb1 and let's trace the block request by blktrace > > $ sudo blktrace -d /dev/sdb1 > > When I write 4KB using dd > $ sudo dd if=/dev/zero of=/dev/sdb1 oflag=direct bs=4k count=1 > > The block trace (after

Re: [systemd-devel] How to stop systemd-udevd reading a device after dd

2017-10-13 Thread Akira Hayakawa
I've investigate myself what uevent are sent after each command. I use "udevadm monitor" to watch the event sent from kernel. The experiment starts from removing the existing device but if it's placed at last, the uevents are the same. What's very curious to me is that the ACTION!="remove" in my

Re: [systemd-devel] How to stop systemd-udevd reading a device after dd

2017-10-13 Thread Akira Hayakawa
Hi, Thanks. The udev rule worked. But only for the unexpected read after write (or close the device by dd maybe) Because the device I want to remove udev control is device-mapper devices which have prefix dm-, I changed the KERNEL in the line from sdb* to dm* then worked. But still I have probl

Re: [systemd-devel] How to stop systemd-udevd reading a device after dd

2017-10-13 Thread Michal Sekletar
On Thu, Oct 12, 2017 at 6:01 PM, Akira Hayakawa wrote: > And I want to stop the read request because it makes it difficult to test > kernel code. > So the second question is: how can I stop the read request? You can install local udev rule that will disable udev's monitoring of the block device

Re: [systemd-devel] How to stop systemd-udevd reading a device after dd

2017-10-12 Thread Mantas Mikulėnas
On Thu, Oct 12, 2017 at 7:01 PM, Akira Hayakawa wrote: > I have a device /dev/sdb1 and let's trace the block request by blktrace > > $ sudo blktrace -d /dev/sdb1 > > When I write 4KB using dd > $ sudo dd if=/dev/zero of=/dev/sdb1 oflag=direct bs=4k count=1 > > The block trace (after blkparsed) is

[systemd-devel] How to stop systemd-udevd reading a device after dd

2017-10-12 Thread Akira Hayakawa
I have a device /dev/sdb1 and let's trace the block request by blktrace $ sudo blktrace -d /dev/sdb1 When I write 4KB using dd $ sudo dd if=/dev/zero of=/dev/sdb1 oflag=direct bs=4k count=1 The block trace (after blkparsed) is write request as expected 8,17 22 0.03171 5930