From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 11 19:59:56 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BE571065673 for ; Thu, 11 Sep 2008 19:59:56 +0000 (UTC) (envelope-from jille@quis.cx) Received: from smtp6.versatel.nl (smtp6.versatel.nl [62.58.50.97]) by mx1.freebsd.org (Postfix) with ESMTP id BA6798FC1B for ; Thu, 11 Sep 2008 19:59:55 +0000 (UTC) (envelope-from jille@quis.cx) Received: (qmail 25993 invoked by uid 0); 11 Sep 2008 19:59:52 -0000 Received: from ip83-113-174-82.adsl2.static.versatel.nl (HELO istud.quis.cx) ([82.174.113.83]) (envelope-sender ) by smtp6.versatel.nl (qmail-ldap-1.03) with SMTP for < >; 11 Sep 2008 19:59:52 -0000 Received: from [192.168.1.4] (ille [192.168.1.4]) by istud.quis.cx (Postfix) with ESMTP id C641E5C1D for ; Thu, 11 Sep 2008 21:59:51 +0200 (CEST) Message-ID: <48C978B7.3000803@quis.cx> Date: Thu, 11 Sep 2008 21:59:51 +0200 From: Jille Timmermans User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: hackers@freebsd.org X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Filtering items in readdir() with own fs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2008 19:59:56 -0000 Hello all, I am trying to create a filesystem that works exactly like nullfs, but hides all .svn dirs (and contents) (Yes, I started with svn cp). I've got it working so far that it denies that the dirs and contents exist (grep isn't complaining; so I can finally grep -r through the source). But it would be nice if I can also hide the .svn dirs in dir listings. I have been looking through a few existing filesystems (unionfs, fdescfs, xfs, devfs). None gave me a good way for hiding specific entries in the listing. With some help of unionfs I have created a direct-pass-through using VOP_READDIR(), but I can't filter it with that. I tried using some xfs code, but didn't get any result with that. Can anyone give me a hint on where to start looking for code that could be used with filtering functionality ? Any file or function ? Thanks in advance, -- Jille