View Single Post
Old 04-29-2004, 10:15 PM  
neoxed
Too much time...
 
Join Date: May 2003
Posts: 1,326
Default TCL: vfs chattr bug (Cache related?)

Code:
PHP Code:
set text "TEST"
set oldpath [resolve pwd $pwd]
set newpath [resolve pwd $pwd].new

iputs "Original: [vfs chattr $oldpath 35]"
vfs chattr $oldpath 35 $text
iputs 
" Read #1: [vfs chattr $oldpath 35]"

file rename -- $oldpath $newpath
iputs 
" Read #2: [vfs chattr $newpath 35]"

append text ":NEW"
vfs chattr $newpath 35 $text
iputs 
" Read #3: [vfs chattr $newpath 35]"

vfs flush $newpath 
file rename 
-- $newpath $oldpath
vfs flush $oldpath
iputs 
" Read #4: [vfs chattr $oldpath 35]" 
Output:
Code:
200-Original: 
200- Read #1: TEST
200- Read #2: TEST
200- Read #3: TEST:NEW
200- Read #4: TEST
200 Command successful.
Read #4 should have also shown "TEST:NEW" however it's still reading the previous chattr. Flushing both old and new paths does not make a difference, it will still read the old chattr.

I opened the .ioFTPD file for the corresponding directory in a hex editor, and it does contain in fact contain "TEST:NEW". After restarting ioFTPD, the chattr would then show "TEST:NEW" for that directory.

My question is, shouldn't vfs flush invalidate the old chattr entries, so ioFTPD would reread the newer entries?
neoxed is offline   Reply With Quote