On Wed, Jun 1, 2011 at 2:37 AM, Amir Goldstein <span dir="ltr">&lt;<a href="mailto:amir73il@gmail.com">amir73il@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Wed, Jun 1, 2011 at 8:34 AM, Eric Sandeen &lt;<a href="mailto:sandeen@redhat.com">sandeen@redhat.com</a>&gt; wrote:<br>
&gt; On 6/1/11 12:22 AM, Eric Sandeen wrote:<br>
&gt;&gt; On 5/31/11 11:56 PM, Amir Goldstein wrote:<br>
&gt;&gt;&gt; On Wed, Jun 1, 2011 at 7:37 AM, Eric Sandeen &lt;<a href="mailto:sandeen@redhat.com">sandeen@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt; On 5/31/11 10:13 PM, Amir Goldstein wrote:<br>
&gt;&gt;&gt;&gt;&gt; From: Amir Goldstein &lt;<a href="mailto:amir73il@users.sf.net">amir73il@users.sf.net</a>&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; blkid knows to identify the ext4dev FSTYP of a partition that was<br>
&gt;&gt;&gt;&gt;&gt; formatted with mkfs.ext4dev.<br>
&gt;&gt;&gt;&gt;&gt; quota tools and various util-linux utils are also aware of ext4dev,<br>
&gt;&gt;&gt;&gt;&gt; so ext4dev shares the same capabilities as ext4.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; While testing on Fedora 15, we encoutered a buggy fsck utility, which<br>
&gt;&gt;&gt;&gt;&gt; invokes fsck.ext4, even though it was called with -t ext4dev argument.<br>
&gt;&gt;&gt;&gt;&gt; In our setup fsck.ext4dev knows about new fs features that fsck.ext4<br>
&gt;&gt;&gt;&gt;&gt; doesn&#39;t know, so the generic_fs_check fails.<br>
&gt;&gt;&gt;&gt;&gt; Since we have no real use of the extra capabilities provided by fsck util,<br>
&gt;&gt;&gt;&gt;&gt; we decided to invoke fsck.$FSTYP directly to avoid this issue.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Adding ext4dev to every case seems harmless enough.  TBH I thought I had<br>
&gt;&gt;&gt;&gt; it there already but I guess not.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I&#39;m less certain of the change from fsck -t $FSTYP to fsck.$FSTYP<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; What issue are you avoiding?  wouldn&#39;t fsck -t ext4dev invoke fsck.ext4dev anyway?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; It seems like it should be harmless, but I don&#39;t understand how it helps you.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; As I wrote in the patch description, the fsck utility in Fedora 15 invokes<br>
&gt;&gt;&gt; fsck.ext4 for some reason when calling fsck -t ext4dev.<br>
&gt;&gt;<br>
&gt;&gt; Oh, right.<br>
&gt;&gt;<br>
&gt;&gt;&gt; this fails because fsck.ext4 doesn&#39;t know the snapshot feature.<br>
&gt;&gt;&gt; I didn&#39;t debug fsck utility for that. it seemed pointless.<br>
&gt;&gt;<br>
&gt;&gt; Did you file a bug with Fedora?  I&#39;d rather fix the root cause than work around it...<br>
&gt;&gt; Feel free to cc: me on the bug.<br>
<br>
</div></div>No, I didn&#39;t file a bug.<br>
In any case, it was Sergey, who tested and reported the problem on F15.<br>
<br>
Would you agree to fix the problem in xfstests now, so that F15 users can<br>
test ext4dev and fix the bug in fsck regardless?<br>
<div class="im"><br>
&gt;<br>
&gt; RHEL6 does the same; mkfs.ext4dev then fsck -t ext4dev invokes fsck.ext4; but this<br>
&gt; is because blkid identifies it as ext4, not ext4dev, despite the test_fs flag being set.<br>
&gt;<br>
&gt; ISTR this is due to some tortured logic about when ext4dev isn&#39;t ext4dev, but<br>
&gt; I don&#39;t remember the details... I don&#39;t know if this is the same situation<br>
&gt; you&#39;re seeing; just to double check - does blkid correctly identify it as ext4dev<br>
&gt; on F15?<br>
<br>
<br>
</div>For me (on Ubuntu) blkid identifies ext4dev, but maybe the tortured logic<br>
finds unknown features a justification for declaring ext4dev?<br>
Segrey, can you answer the question for F15?<br>
Did you set FSTYP to ext4dev manually or did blkid identified it for you?<br></blockquote><div><br></div><div>Amir, Fedora&#39;s fsck behaves differently on ext4dev and next4. When I made next4 partition on Fedora-15 by </div>
<div>{{{</div><div>mkfs  -t next4 /dev/sdd9</div><div>}}}</div><div>it requires &quot;export FSTYP=next4&quot; to be defined and exported in local.conf. It mounts partition with</div><div>{{{</div><div>mount -t next4 /dev/sdd9 /mnt/sdd9</div>
<div>}}}</div><div>But on attempt to fsck it calls wrong fsck, as you reported:</div><div>{{{</div><div><div>[seriv@pimbra xfstests]$ sudo fsck -t next4 /dev/sdd9</div><div>fsck from util-linux 2.19.1</div><div>e2fsck 1.41.14 (22-Dec-2010)</div>
<div>/dev/sdd9 has unsupported feature(s): FEATURE_C7 FEATURE_C8 FEATURE_R7</div><div>e2fsck: Get a newer version of e2fsck!</div></div><div>}}}</div><div><br></div><div>And the problem can be easily traced to this wrong call:</div>
<div>{{{</div><div><div>[seriv@pimbra xfstests]$ sudo strace -o /var/log/fsck.strace fsck -t next4 /dev/sdd9  </div><div>fsck from util-linux 2.19.1</div><div>e2fsck 1.41.14 (22-Dec-2010)</div><div>/dev/sdd9 has unsupported feature(s): FEATURE_C7 FEATURE_C8 FEATURE_R7</div>
<div>e2fsck: Get a newer version of e2fsck!</div><div>[seriv@pimbra xfstests]$ grep sbin /var/log/fsck.strace </div><div>execve(&quot;/sbin/fsck&quot;, [&quot;fsck&quot;, &quot;-t&quot;, &quot;next4&quot;, &quot;/dev/sdd9&quot;], [/* 17 vars */]) = 0</div>
<div>stat(&quot;/sbin/fsck.ext4&quot;, {st_mode=S_IFREG|0755, st_size=194280, ...}) = 0</div></div><div>}}}</div><div><br></div><div>But it&#39;s not the case for ext4dev, with it I even don&#39;t need &quot;-t ext4dev&quot;, it is recognized by blkid:</div>
<div>{{{</div><div><div>[seriv@pimbra xfstests]$ sudo mkfs -t ext4dev /dev/sdd9</div><div>mke2fs 1.41.14-next3-1.0.13-7 (24-May-2011)</div><div>[skip]</div><div>This filesystem will be automatically checked every 27 mounts or</div>
<div>180 days, whichever comes first.  Use tune2fs -c or -i to override.</div><div>[seriv@pimbra xfstests]$ sudo mount /dev/sdd9 /mnt/sdd9</div><div>[seriv@pimbra xfstests]$ mount | grep sdd9</div><div>/dev/sdd9 on /mnt/sdd9 type ext4dev (rw)</div>
<div>[seriv@pimbra xfstests]$ sudo umount /dev/sdd9</div><div>[seriv@pimbra xfstests]$ sudo fsck /dev/sdd9</div><div>fsck from util-linux 2.19.1</div><div>e2fsck 1.41.14-next3-1.0.13-7 (24-May-2011)</div><div>The test_fs flag is set (and ext4 is available).  Clear&lt;y&gt;? </div>
</div><div>}}}</div><div>and at this point in another session</div><div>{{{</div><div><div>[seriv@pimbra xfstests]$ pgrep -f -l fsck</div><div>4365 sudo fsck /dev/sdd9</div><div>4366 fsck /dev/sdd9</div><div>4367 fsck.ext4dev /dev/sdd9</div>
</div><div>}}}</div><div><br></div><div>So I&#39;d like this patch to be applied to xfstests to be able to use it on the different filesystems, - if not, then why have this FSTYP and not rely upon blkid</div><div>-- </div>
<div>  Regards,</div><div>   Sergey Ivanov.</div></div><br>