From owner-svn-src-user@FreeBSD.ORG Thu Dec 5 13:51:20 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A738F9; Thu, 5 Dec 2013 13:51:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E4221E11; Thu, 5 Dec 2013 13:51:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5DpJ69037909; Thu, 5 Dec 2013 13:51:19 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5DpJuT037908; Thu, 5 Dec 2013 13:51:19 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201312051351.rB5DpJuT037908@svn.freebsd.org> From: Peter Holm Date: Thu, 5 Dec 2013 13:51:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r258980 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 13:51:20 -0000 Author: pho Date: Thu Dec 5 13:51:19 2013 New Revision: 258980 URL: http://svnweb.freebsd.org/changeset/base/258980 Log: Added more file systems to this test and added struct _dirdesc. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/readdir.sh Modified: user/pho/stress2/misc/readdir.sh ============================================================================== --- user/pho/stress2/misc/readdir.sh Thu Dec 5 12:58:33 2013 (r258979) +++ user/pho/stress2/misc/readdir.sh Thu Dec 5 13:51:19 2013 (r258980) @@ -47,7 +47,6 @@ rm -f readdir.c mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart - mount -t tmpfs tmpfs $mntpoint echo "Testing tmpfs(5)" cp -a /usr/include $mntpoint @@ -64,15 +63,30 @@ mount -t procfs procfs $mntpoint /tmp/readdir $mntpoint umount $mntpoint -mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart +echo "Testing nfs" +mount -t nfs -o nfsv3,tcp,nolockd 127.0.0.1:/tmp $mntpoint +/tmp/readdir $mntpoint +umount $mntpoint + mdconfig -a -t swap -s 1g -u $mdstart || exit 1 bsdlabel -w md$mdstart auto -newfs -U md${mdstart}$part > /dev/null +newfs md${mdstart}$part > /dev/null +mount /dev/md${mdstart}$part $mntpoint +cp -a /usr/include $mntpoint +echo "Testing UFS" +/tmp/readdir $mntpoint +umount $mntpoint +mdconfig -d -u $mdstart + +mdconfig -a -t swap -s 1g -u $mdstart || exit 1 +bsdlabel -w md$mdstart auto +newfs $newfs_flags md${mdstart}$part > /dev/null mount /dev/md${mdstart}$part $mntpoint cp -a /usr/include $mntpoint echo "Testing FFS" /tmp/readdir $mntpoint umount $mntpoint +mdconfig -d -u $mdstart mount -t nullfs /bin $mntpoint echo "Testing nullfs(5)" @@ -83,17 +97,41 @@ rm -f /tmp/readdir exit 0 EOF #include -#include #include #include #include #include #include #include +#include #include #include #include +/* copy from /usr/src/lib/libc/gen/gen-private.h */ +struct _telldir; /* see telldir.h */ +struct pthread_mutex; + +/* + * Structure describing an open directory. + * + * NOTE. Change structure layout with care, at least dd_fd field has to + * remain unchanged to guarantee backward compatibility. + */ +struct _dirdesc { + int dd_fd; /* file descriptor associated with directory */ + long dd_loc; /* offset in current buffer */ + long dd_size; /* amount of data returned by getdirentries */ + char *dd_buf; /* data buffer */ + int dd_len; /* size of data buffer */ + long dd_seek; /* magic cookie returned by getdirentries */ + long dd_rewind; /* magic cookie for rewinding */ + int dd_flags; /* flags for readdir */ + struct pthread_mutex *dd_lock; /* lock */ + struct _telldir *dd_td; /* telldir position recording */ +}; +/* End copy */ + static void hand(int i __unused) { /* handler */ _exit(1);