lk: implement mkfifo

Zach Brown zach.brown at oracle.com
Fri Apr 18 11:50:15 PDT 2008


Alex Chiang wrote:
> Implement mkfifo.
> 
> For POSIX compliance, we need to update the directory's ctime and
> mtime when the FIFO is created, so add a crfs_change_cinode
> stanza to the metadata change set.

Awesome, this looks great.  I applied it.

> Leaving it as inode_inc_link_count results in a deadlock since
> the following will happen:
> 
> 	mark_inode_dirty 
> 	 crfs_dirty_inode
> 	  crfs_meta_change_prepare
> 	   __lock_pages
> 	    /* ruh roh */

Aha, so that's where that came from.  Yes, that would certainly do it ;).

> This patch allows crfs to pass 100 / 105 (95%) of the POSIX FIFO
> tests.
> 
> [The remaining 5 failures are a generic mknod issue with removing
> very long filenames.]

We get away with not having implemented hard links yet?  That surprises
me a little.

FWIW, they'd be easy to implement now that we have helpers which can
work with directory entry items that contain multiple dirent structs.

- z



More information about the crfs-devel mailing list