[ClusterNFS-Devel] improvements to the create tag
Brought to you by:
warnes
From: Bernd S. <ber...@we...> - 2002-03-05 00:04:49
|
Hi Greg and all the others, several weeks ago I complained that even when the CREATE tag is set, the servers files are overwritten from the clients. For example when a file with filename, another with filename$$CREATE=IP$$ exist, but no file with filename$$any_other_tag$$. So here's a small and still incomplete patch (I don't know how to use the diff command to create patch compatible formats -- I'll lookup that tomorrow, or can give someone of a hint to me?). Actually, this patch only works properly together with "$$IP=...$$" and "$$CREATE=IP$$" tags but adding the other tags will not be difficult (but its late in the night here and I want to go to bed now). Furthermore, you'll get input/output errors when doing for example a ls and a file with "$$CREATE=$$" exists but no file with the same filename and the tag "$$IP=..". But nevertheless the servers files shoulnd't be overwritten any longer. I think to prevent the input/output errors the servers filename has to be removed from the filelist when a file with filename$$CREATE=..$$ exists. I think this has to be done in nfsd.c:1121. Unfortunality another loop is necessary to scan files, that have the CREATE tag and then delete this files from the current while loop at nfsd.c:1121. Or has anyone another idea? I'm only posting this incomlete patch, to ask if you agree with my code (I'm a C novice and want to make sure that I havn't done any mistakes). Thanks in advance for you patience, Bernd PS: Thanks again Greg for your hint about running it within the debugger, it worked fine. |