On Fri, Jan 20, 2017 at 07:53:42PM +0300, Artem Blagodarenko wrote: > Inode reference count is not increased after debugfs link command. > This leads to inconsistent file system state. That was deliberate. Originally the "link" and "unlink" commands were designed as a low-level command that didn't change the link count. There are *many* commands in debugfs that can lead to inconsistent file system state. In fact, the original raison d'être of debugfs was to create corrupted file systems to test e2fsck. :-) The "rm" command is user-friendly command that I added later which decrements the link count and deallocates the blocks if the link count goes to zero. I never got around to adding a user-friendly 'ln' command which creates the directory entry and also increments the link count. That's mainly because no one has really needed or wanted that functionality. Or at least, no one has requested it up until now. If you really want it, probably the best thing to do would be unalias the "link" and "ln" commands, and make the "ln" command the user-friendly command that works like the /bin/ln command. Cheers, - Ted