From owner-freebsd-bugs Wed Mar 15 1:50: 4 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 6BFBC37B9B4 for ; Wed, 15 Mar 2000 01:50:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id BAA01414; Wed, 15 Mar 2000 01:50:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 4795E37B983 for ; Wed, 15 Mar 2000 01:49:10 -0800 (PST) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id BAA01352; Wed, 15 Mar 2000 01:49:10 -0800 (PST) (envelope-from nobody@FreeBSD.org) Message-Id: <200003150949.BAA01352@freefall.freebsd.org> Date: Wed, 15 Mar 2000 01:49:10 -0800 (PST) From: aef@cliph.keytown.com To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/17389: /bin/cp failed on some synthetic vfs Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 17389 >Category: bin >Synopsis: /bin/cp failed on some synthetic vfs >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Mar 15 01:50:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Andrew Filonov >Release: 4.0-CURRENT >Organization: n/a >Environment: FreeBSD aef 4.0-CURRENT FreeBSD 4.0-CURRENT #0: Fri Mar 10 16:19:21 MSK 2000 root@aef:/usr/src/sys/compile/AEF i386 >Description: When i copy file from synthetic vfs (portalfs), /bin/cp use mmap for source file and failed with EINVAL error cp /portal/tcp/localhost/daytime somefile >How-To-Repeat: 100% >Fix: Check st_blocks value. For synthetic file - always 0. Simple path for src/bin/cp/utils.c 128c128 < if (S_ISREG(fs->st_mode) && fs->st_size <= 8 * 1048576) { --- > if (S_ISREG(fs->st_mode) && fs->st_size <= 8 * 1048576 && fs->st_blocks > 0) { >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message