Date: Thu, 2 Nov 2006 23:02:56 -0600 From: Craig Boston <craig@tobuj.gank.org> To: Jan Grant <jan.grant@bristol.ac.uk> Cc: freebsd-hackers@freebsd.org, Daniel Valencia <fetrovsky@yahoo.com> Subject: Re: [patch] rm can have undesired side-effects Message-ID: <20061103050256.GA87797@nowhere> In-Reply-To: <20061102104744.O52313@tribble.ilrt.bris.ac.uk> References: <20061031161640.71807.qmail@web53907.mail.yahoo.com> <20061102104744.O52313@tribble.ilrt.bris.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 02, 2006 at 10:52:19AM +0000, Jan Grant wrote: > This is, I reckon, the only sensible suggestion thus far: if the FS > doesn't help you then you are implicitly depending on the FS > implementation to ensure you are writing over the original data blocks > anyway. And you may very well not be. If the underlying FS is say for example journaled or snapshotted, your new data blocks may go to a completely different part of the disk. For UFS today -P may work most of the time, assuming no snapshots or other events moving the file. With gjournal and gvirtstor coming who knows if that will remain true. That doesn't even take into account things like unionfs or other VFS stacking. If writing zeros or whatever to a file (that may or may not overwrite the previous contents on disk) is really what you want to do, dd works just fine for the task. /me votes for removing the -P misfeature altogether Craig
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061103050256.GA87797>