Hi guys, I am looking at different implementations of readir functions across various filesystems and I think it isn't obvious how should the filldir_t callback return code be handled. Here is what I found how different filesystems will handle it: - some will abort reading on any non-zero return code and return zero from readdir (ext2, ext3, minix, jfs) - this is what I thought should happen - others seem to abort only on negative return codes but still return zero to vfs_readdir (nfs, reiserfs) - what will reiserfs do if filldir returns a positive value? continue filling? - smbfs: - will check for negative values for . and .. and return zero then - for other dentries check for any non-zero and return zero - and then there are even stranger ones like cifs who will do one thing for . and .. : - check for negative return value, return -ENOMEM - and a different thing for other dentries: - abort on non-zero, return exactly the same value (including positive), except if it is -EOVERFLOW when it will return zero So either I am totally confused and completely misinterpreting what the code says or there is something really strange going on? Are filesystems making different assumptions about the filldir_t callback? What is the right thing to do? Thanks, Tvrtko Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom. Company Reg No 2096520. VAT Reg No GB 348 3873 20. - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html