DragonFly BSD
DragonFly kernel List (threaded) for 2009-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

porting tmpfs


From: Nikita Glukhov <a63fvb48@xxxxxxxxx>
Date: Sat, 14 Nov 2009 13:39:33 +0300

Hi.

In July, I’ve fixed file truncating bug.  The problem was the lack of
a call to vtruncbuf() in tmpfs_reg_resize().  Now tmpfs survives
testing with fsx and fsstress.  But also I found some bug at
fsstress.c: in function creat_f() line 1684 "add_to_flist(type, id,
parid);" must be after the following line "#endif".  Without this
change fsstress does not remember files that it is created and no
reading/writing is performed. (“no filename” error is displayed in
verbose mode.)

Also I don’t understand why Alex Hornung has removed tmpfs_spec_vnops.
Without adding this ops call to mknod() ends with panic. (I have to
run fsstress with option “–f mknod=0”.)

Next I tried to use objcache instead of plain kmalloc() to allocate
tmpfs nodes and direntries.  But when objcache is destroyed during
unmount, there is a crit_panic "td_pri is/would-go negative! -26"
caused by mag_purge() calling crit_exit() at objcache.c. It seems that
mag_purge() is not called from the critical section as it is expected.

tmpfs now really takes double memory space. I tried to implement page
moving between VM objects but I’ve never seen buffer passed to
tmpfs_strategy() with B_RELBUF set. All my attempts to modify buffer
flags in tmpfs_read() end with global deadlock.

2 diffs to Alex Hornung's tree are attached: first uses kmalloc(),
second uses objcache.

Attachment: tmpfs.diff
Description: Binary data

Attachment: tmpfs-objcache.diff
Description: Binary data



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]