e2fsprogs icon indicating copy to clipboard operation
e2fsprogs copied to clipboard

u_direct_io is failing in 1.46.4

Open kanavin opened this issue 4 years ago • 1 comments

.failed:

root@qemux86-64:/usr/lib/e2fsprogs/ptest/test# cat .failed 
--- u_direct_io//expect	2018-03-09 12:34:56.000000000 +0000
+++ .log	2021-08-22 10:40:05.404886893 +0000
@@ -19,8 +19,8 @@
 Inode count:              32768
 Block count:              32768
 Reserved block count:     1638
-Overhead clusters:        5131
-Free blocks:              27631
+Overhead clusters:        6155
+Free blocks:              26607
 Free inodes:              32757
 First block:              0
 Block size:               4096
@@ -29,27 +29,29 @@
 Blocks per group:         32768
 Fragments per group:      32768
 Inodes per group:         32768
-Inode blocks per group:   1024
+Inode blocks per group:   2048
 Flex block group size:    16
 Mount count:              0
 Check interval:           15552000 (6 months)
 Reserved blocks uid:      0
 Reserved blocks gid:      0
 First inode:              11
-Inode size:	          128
+Inode size:	          256
+Required extra isize:     32
+Desired extra isize:      32
 Journal inode:            8
 Default directory hash:   half_md4
 Journal backup:           inode blocks
 Directories:              2
  Group  0: block bitmap at 9, inode bitmap at 25, inode table at 41
-           27631 free blocks, 32757 free inodes, 2 used directories
+           26607 free blocks, 32757 free inodes, 2 used directories
 e2fsck -fn -N test_filesys $LOOP
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
 Pass 4: Checking reference counts
 Pass 5: Checking group summary information
-test_filesys: 11/32768 files (9.1% non-contiguous), 5137/32768 blocks
+test_filesys: 11/32768 files (9.1% non-contiguous), 6161/32768 blocks
 Exit status is 0
 e2fsck -fn -N test_filesys $TMPFILE
 Pass 1: Checking inodes, blocks, and sizes
@@ -57,5 +59,5 @@
 Pass 3: Checking directory connectivity
 Pass 4: Checking reference counts
 Pass 5: Checking group summary information
-test_filesys: 11/32768 files (9.1% non-contiguous), 5137/32768 blocks
+test_filesys: 11/32768 files (9.1% non-contiguous), 6161/32768 blocks
 Exit status is 0

.log

root@qemux86-64:/usr/lib/e2fsprogs/ptest/test# cat .log 
mke2fs -F -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D $LOOP
Creating filesystem with 32768 4k blocks and 32768 inodes

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

debugfs -D -R stats $LOOP
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file dir_nlink extra_isize
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              32768
Block count:              32768
Reserved block count:     1638
Overhead clusters:        6155
Free blocks:              26607
Free inodes:              32757
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      7
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         32768
Inode blocks per group:   2048
Flex block group size:    16
Mount count:              0
Check interval:           15552000 (6 months)
Reserved blocks uid:      0
Reserved blocks gid:      0
First inode:              11
Inode size:	          256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Journal backup:           inode blocks
Directories:              2
 Group  0: block bitmap at 9, inode bitmap at 25, inode table at 41
           26607 free blocks, 32757 free inodes, 2 used directories
e2fsck -fn -N test_filesys $LOOP
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32768 files (9.1% non-contiguous), 6161/32768 blocks
Exit status is 0
e2fsck -fn -N test_filesys $TMPFILE
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32768 files (9.1% non-contiguous), 6161/32768 blocks
Exit status is 0

/etc/mke2fs.conf:

root@qemux86-64:/usr/lib/e2fsprogs/ptest/test# cat /etc/mke2fs.conf 
[defaults]
	base_features = sparse_super,large_file,filetype,resize_inode,dir_index,ext_attr
	default_mntopts = acl,user_xattr
	enable_periodic_fsck = 0
	blocksize = 4096
	inode_size = 256
	inode_ratio = 16384

[fs_types]
	ext3 = {
		features = has_journal
	}
	ext4 = {
		features = has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize
	}
	small = {
		blocksize = 1024
		inode_ratio = 4096
	}
	floppy = {
		blocksize = 1024
		inode_ratio = 8192
	}
	big = {
		inode_ratio = 32768
	}
	huge = {
		inode_ratio = 65536
	}
	news = {
		inode_ratio = 4096
	}
	largefile = {
		inode_ratio = 1048576
		blocksize = -1
	}
	largefile4 = {
		inode_ratio = 4194304
		blocksize = -1
	}
	hurd = {
	     blocksize = 4096
	     inode_size = 128
	     warn_y2038_dates = 0
	}

There are also messages from the kernel:

root@qemux86-64:/usr/lib/e2fsprogs/ptest/test# ./test_one u_direct_io/
[ 2422.216855] loop0: detected capacity change from 0 to 262144
[ 2422.986613] blk_update_request: operation not supported error, dev loop0, sector 262016 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg 0 prio class 0
[ 2423.006788] blk_update_request: operation not supported error, dev loop0, sector 328 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg 0 prio class 0
[ 2423.246709] blk_update_request: operation not supported error, dev loop0, sector 16712 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg 0 prio class 0
[ 2423.264232] blk_update_request: operation not supported error, dev loop0, sector 120 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg 0 prio class 0
[ 2423.268703] blk_update_request: operation not supported error, dev loop0, sector 208 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg 0 prio class 0
[ 2423.274219] blk_update_request: operation not supported error, dev loop0, sector 16720 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg 0 prio class 0
: direct I/O in unix_io: failed
root@qemux86-64:/usr/lib/e2fsprogs/ptest/test# uname -a
Linux qemux86-64 5.13.9-yocto-standard #1 SMP PREEMPT Mon Aug 9 02:11:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

kanavin avatar Aug 22 '21 10:08 kanavin

Is this causing it perhaps? https://github.com/tytso/e2fsprogs/commit/a23b50cdb55cb826b8745cbc37429c93f7b60c66#diff-45e335f145734df15792f3f62b638139f502b19905cc8c1d13d26bc0ea9e7fa5

kanavin avatar Aug 22 '21 11:08 kanavin