On Mon, 04.10.2010 at 14:04:53 +0200, Ivan Voras wrote:
> On 4 October 2010 13:42, Alexander Best <arun...@freebsd.org> wrote:
> 
> > good point. ZFS should really be added to the list and LFS should go away. 
> > are
> > there any other relevant filesystems without a fixed-block size that need 
> > to be
> > mentioned? what about afs? or tmpfs?
> 
> (it's not that the block sizes aren't fixed, it's that the assignment
> of blocks to the file is not fixed).

Review of attached patch, anyone? I didn't come up with a clever way to
describe non-COW file systems :/
commit 1756b0548e6b18a88e58fad0d078a507c2d87422
Author: Ulrich Spörlein <u...@spoerlein.net>
Date:   Fri Oct 8 12:29:06 2010 +0200

    rm(1): clarify that -P works only when the block allocation is static
    
    Suggested by:	pjd, ivoras

diff --git a/bin/rm/rm.1 b/bin/rm/rm.1
index f580d33..dfba07b 100644
--- a/bin/rm/rm.1
+++ b/bin/rm/rm.1
@@ -32,7 +32,7 @@
 .\"	@(#)rm.1	8.5 (Berkeley) 12/5/94
 .\" $FreeBSD$
 .\"
-.Dd October 3, 2010
+.Dd October 8, 2010
 .Dt RM 1
 .Os
 .Sh NAME
@@ -229,8 +229,8 @@ command appeared in
 .Sh BUGS
 The
 .Fl P
-option assumes that the underlying file system is a fixed-block file
-system.
-UFS is a fixed-block file system, LFS is not.
+option assumes that the underlying file system does not allocate new blocks
+when writing to existing blocks.
+This is true for UFS but not for ZFS, which is using Copy-On-Write.
 In addition, only regular files are overwritten, other types of files
 are not.
diff --git a/bin/rm/rm.c b/bin/rm/rm.c
index d9bd296..653833a 100644
--- a/bin/rm/rm.c
+++ b/bin/rm/rm.c
@@ -402,8 +402,8 @@ rm_file(char **argv)
  * This is a cheap way to *really* delete files.  Note that only regular
  * files are deleted, directories (and therefore names) will remain.
  * Also, this assumes a fixed-block file system (like FFS, or a V7 or a
- * System V file system).  In a logging file system, you'll have to have
- * kernel support.
+ * System V file system).  In a logging or COW file system, you'll have to
+ * have kernel support.
  */
 int
 rm_overwrite(char *file, struct stat *sbp)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to