it looks like the gdbm takes the wrong way to allocate file. if xfs mount with largeio and swidth with 3 times of sunit, gdbm cannot create db Reproducible: Always Steps to Reproduce: here is the console output about how I produce this problem, and have the error message 51G ~ # cd /tmp 51G tmp # dd if=/dev/zero of=empty count=1000000 51G tmp # mkfs.xfs empty 51G tmp # mkdir tt 51G tmp # mount -o loop -o defaults,largeio,sunit=8,swidth=24 empty tt/ 51G tmp # cd tt 51G tt # python -c "import gdbm;gdbm.open('test.db', 'n')" Traceback (most recent call last): File "<string>", line 1, in <module> gdbm.error: Block size error 51G tt # Actual Results: gdbm.error: Block size error Expected Results: gdbm successful create the db