From owner-svn-src-all@FreeBSD.ORG Fri Oct 8 15:20:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F06421065670; Fri, 8 Oct 2010 15:20:20 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E11A88FC12; Fri, 8 Oct 2010 15:20:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o98FKKg4098030; Fri, 8 Oct 2010 15:20:20 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o98FKK4R098027; Fri, 8 Oct 2010 15:20:20 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201010081520.o98FKK4R098027@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 8 Oct 2010 15:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213582 - head/bin/rm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Oct 2010 15:20:21 -0000 Author: uqs Date: Fri Oct 8 15:20:20 2010 New Revision: 213582 URL: http://svn.freebsd.org/changeset/base/213582 Log: rm(1): clarify that -P works only when blocks are updated in-place Suggested by: pjd, ivoras, arundel Modified: head/bin/rm/rm.1 head/bin/rm/rm.c Modified: head/bin/rm/rm.1 ============================================================================== --- head/bin/rm/rm.1 Fri Oct 8 15:10:30 2010 (r213581) +++ head/bin/rm/rm.1 Fri Oct 8 15:20:20 2010 (r213582) @@ -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 updates existing blocks +in-place and does not store new data in a new location. +This is true for UFS but not for ZFS, which is using a Copy-On-Write strategy. In addition, only regular files are overwritten, other types of files are not. Modified: head/bin/rm/rm.c ============================================================================== --- head/bin/rm/rm.c Fri Oct 8 15:10:30 2010 (r213581) +++ head/bin/rm/rm.c Fri Oct 8 15:20:20 2010 (r213582) @@ -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)