<div id="appVersion:飞书-4.8.3-editorVersion:0.9.6"></div><div><div style="hyphens: auto; line-height: 1.68;"><div data-gramm="false" data-last-height="698" data-last-width="899.333" style="hyphens: auto; font-family: arial, helvetica, sans-serif; color: rgb(31, 35, 41); line-height: 1.68;"><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily  fontsize fontcolor " style="font-family: arial, helvetica, sans-serif; font-size: 14px; color: #1F2329;">Dear dm-devel:</span></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily  fontsize fontcolor " style="font-family: arial, helvetica, sans-serif; font-size: 14px; color: #1F2329;">I encountered the same problem as this one. Is there a solution?</span></div><div class="" dir="auto" style="margin: 4px 0px;"><br></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily  fontsize fontcolor " style="font-family: arial, helvetica, sans-serif; font-size: 14px; color: #1F2329;">refer:</span><span class="outer-u-container "><span class=" hyperlink-href:https://listman.redhat.com/archives/dm-devel/2021-April/msg00017.html fontfamily  fontsize fontcolor " style="font-family: arial, helvetica, sans-serif; font-size: 14px; color: #1F2329;"><a href="https://listman.redhat.com/archives/dm-devel/2021-April/msg00017.html" rel="noopener" target="_blank" style="cursor: pointer; transition: color 0.3s ease 0s; text-decoration: none; color: rgb(51, 112, 255);">https://listman.redhat.com/archives/dm-devel/2021-April/msg00017.html</a></span></span></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily  fontcolor " style="font-family: arial, helvetica, sans-serif; color: #000000;">[dm-devel] dm-init.c: boot up race with partitions</span></div><ul style="margin-top: 0px; margin-bottom: 0px; padding-left: 0px; list-style-position: inside;"><li class="list-backgroundcolor:rgb(222,&nbsp;224,&nbsp;227) " style="padding-left: 0px; display: list-item;"><span style="position: inherit; display: none; margin-left: 0px;"></span><span class="pocket-ignore pocket-ignore-faketext" data-faketext="" data-contentcollector-ignore-space-at="end" style="background-color: rgb(222,&nbsp;224,&nbsp;227); background-color: rgb(222,&nbsp;224,&nbsp;227);">​</span><span class=" fontfamily  fontcolor " style="font-family: arial, helvetica, sans-serif; color: #1F2329;">​</span><span class=" i fontfamily fontweight  fontsize fontcolor " style="font-family: arial, helvetica, sans-serif; font-weight: 400; font-size: 14px; color: #000000;"><i>From</i></span><span class=" fontfamily fontweight  fontsize fontcolor " style="font-family: arial, helvetica, sans-serif; font-weight: 400; font-size: 14px; color: #000000;">: Steven Walter <steven stevenwalter org></span></li><li class="list-backgroundcolor:rgb(222,&nbsp;224,&nbsp;227) " style="padding-left: 0px; display: list-item;"><span style="position: inherit; display: none; margin-left: 0px;"></span><span class="pocket-ignore pocket-ignore-faketext" data-faketext="" data-contentcollector-ignore-space-at="end" style="background-color: rgb(222,&nbsp;224,&nbsp;227); background-color: rgb(222,&nbsp;224,&nbsp;227);">​</span><span class=" fontfamily  fontcolor " style="font-family: arial, helvetica, sans-serif; color: #1F2329;">​</span><span class=" i fontfamily fontweight  fontsize fontcolor " style="font-family: arial, helvetica, sans-serif; font-weight: 400; font-size: 14px; color: #000000;"><i>To</i></span><span class=" fontfamily fontweight  fontsize fontcolor " style="font-family: arial, helvetica, sans-serif; font-weight: 400; font-size: 14px; color: #000000;">: "dm-devel redhat com" <dm-devel redhat com></span></li><li class="list-backgroundcolor:rgb(222,&nbsp;224,&nbsp;227) " style="padding-left: 0px; display: list-item;"><span style="position: inherit; display: none; margin-left: 0px;"></span><span class="pocket-ignore pocket-ignore-faketext" data-faketext="" data-contentcollector-ignore-space-at="end" style="background-color: rgb(222,&nbsp;224,&nbsp;227); background-color: rgb(222,&nbsp;224,&nbsp;227);">​</span><span class=" fontfamily  fontcolor " style="font-family: arial, helvetica, sans-serif; color: #1F2329;">​</span><span class=" i fontfamily fontweight  fontsize fontcolor " style="font-family: arial, helvetica, sans-serif; font-weight: 400; font-size: 14px; color: #000000;"><i>Subject</i></span><span class=" fontfamily fontweight  fontsize fontcolor " style="font-family: arial, helvetica, sans-serif; font-weight: 400; font-size: 14px; color: #000000;">: [dm-devel] dm-init.c: boot up race with partitions</span></li><li class="list-backgroundcolor:rgb(222,&nbsp;224,&nbsp;227) " style="padding-left: 0px; display: list-item;"><span style="position: inherit; display: none; margin-left: 0px;"></span><span class="pocket-ignore pocket-ignore-faketext" data-faketext="" data-contentcollector-ignore-space-at="end" style="background-color: rgb(222,&nbsp;224,&nbsp;227); background-color: rgb(222,&nbsp;224,&nbsp;227);">​</span><span class=" fontfamily  fontcolor " style="font-family: arial, helvetica, sans-serif; color: #1F2329;">​</span><span class=" i fontfamily fontweight  fontsize fontcolor " style="font-family: arial, helvetica, sans-serif; font-weight: 400; font-size: 14px; color: #000000;"><i>Date</i></span><span class=" fontfamily fontweight  fontsize fontcolor " style="font-family: arial, helvetica, sans-serif; font-weight: 400; font-size: 14px; color: #000000;">: Mon, 05 Apr 2021 21:38:15 +0000</span></li></ul><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;">I am using the dm-mod.create kernel command line parameter to create a verity device at boot.  Both the data device and hash device are partitions on an eMMC device.  Seemingly at random, the verity device fails to be created at boot because dm_init_init() (and wait_for_device_probe()) returned before the partitions had been scanned:</span></div><div class="" dir="auto" style="margin: 4px 0px;"><br></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;">mmc1: new high speed MMC card at address 0001</span></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;">device-mapper: table: 253:0: verity: Data device lookup failed</span></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;">device-mapper: ioctl: error adding target to table</span></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;">mmcblk1: mmc1:0001 064G30 58.2 GiB</span></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;">mmcblk1boot0: mmc1:0001 064G30 partition 1 4.00 MiB</span></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;">mmcblk1boot1: mmc1:0001 064G30 partition 2 4.00 MiB</span></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;">mmcblk1rpmb: mmc1:0001 064G30 partition 3 4.00 MiB, chardev (247:0)</span></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;"> mmcblk1: p1 p2 p3 p4 p5 p6 p7</span></div><div class="" dir="auto" style="margin: 4px 0px;"><br></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;">I don't see how wait_for_device_probe() knows when partition scanning has been completed.  Is this a race or am I missing something?</span></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;">--</span></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;">- Steven Walter <steven stevenwalter org></span></div><div class="" dir="auto" style="margin: 4px 0px;"><span class=" fontfamily backgroundcolor fontweight  fontcolor " style="font-family: arial, helvetica, sans-serif; background-color: rgb(222, 224, 227); font-weight: 400; color: #000000;">Sent from ProtonMail, encrypted email based in Switzerland.</span></div></div></div></div><html><head></head><body><div><div data-gramm="false" data-is-loading-text="正在加载..." data-last-height="88" data-last-width="762" style="line-height: 1.6; position: relative; hyphens: auto; font-size: 14px;"><div class="" dir="auto"><br></div><div class="" dir="auto"><span class=" fontfamily  fontsize fontcolor " style="font-family: helvetica; font-size: 12px; color: #262626;">声明:这封邮件只允许文件接收者阅读,有很高的机密性要求。禁止其他人使用、打开、复制或转发里面的任何内容。</span></div><div class="" dir="auto"><span class=" fontfamily  fontsize fontcolor " style="font-family: helvetica; font-size: 12px; color: #262626;">如果本邮件错误地发给了你,请联系邮件发出者并删除这个文件。机密及法律的特权并不因为误发邮件而放弃或丧失。</span></div><div class="" dir="auto"><span class=" fontfamily  fontsize fontcolor " style="font-family: helvetica; font-size: 12px; color: #262626;">任何提出的观点或意见只属于作者的个人见解,并不一定代表理想汽车。</span></div></div></div></body></html>