Date: Wed, 15 Mar 2000 01:49:10 -0800 (PST) From: aef@cliph.keytown.com To: freebsd-gnats-submit@FreeBSD.org Subject: bin/17389: /bin/cp failed on some synthetic vfs Message-ID: <200003150949.BAA01352@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003150949.BAA01352>