lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061208041656.GB14363@filer.fsl.cs.sunysb.edu>
Date:	Thu, 7 Dec 2006 23:16:59 -0500
From:	Josef Sipek <jsipek@....cs.sunysb.edu>
To:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
Cc:	"Josef 'Jeff' Sipek" <jsipek@...sunysb.edu>,
	linux-kernel@...r.kernel.org, torvalds@...l.org, akpm@...l.org,
	hch@...radead.org, viro@....linux.org.uk,
	linux-fsdevel@...r.kernel.org, mhalcrow@...ibm.com
Subject: Re: [PATCH 15/35] Unionfs: Common file operations

On Tue, Dec 05, 2006 at 10:02:10PM +0100, Jan Engelhardt wrote:
> On Dec 4 2006 07:30, Josef 'Jeff' Sipek wrote:
> >+long unionfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> >+{
> >+	long err;
> >+
> >+	if ((err = unionfs_file_revalidate(file, 1)))
> >+		goto out;
> >+
> >+	/* check if asked for local commands */
> >+	switch (cmd) {
> >+		case UNIONFS_IOCTL_INCGEN:
> >+			/* Increment the superblock generation count */
> >+			err = -EACCES;
> >+			if (!capable(CAP_SYS_ADMIN))
> >+				goto out;
> >+			err = unionfs_ioctl_incgen(file, cmd, arg);
> >+			break;
> >+
> >+		case UNIONFS_IOCTL_QUERYFILE:
> >+			/* Return list of branches containing the given file */
> >+			err = unionfs_ioctl_queryfile(file, cmd, arg);
> >+			break;
> >+
> >+		default:
> >+			/* pass the ioctl down */
> >+			err = do_ioctl(file, cmd, arg);
> >+			break;
> >+	}
> >+
> >+out:
> >+	return err;
> >+}
> 
> 
> I think there was an ioctl for files to find out where a particular
> file lives on disk.

That's the UNIONFS_IOCTL_QUERYFILE case.

> Do you think unionfs should handle it and return
> something more or less meaningful?

It is a very useful functionality for any stackable filesystem which may
store files on one of several branches. Do I think that it should be
factored out of Unionfs into fsstack or similar? Not at the moment. If there
seems to be a need for it, then I'd gladly move it out of Unionfs, but until
then I don't see a reason to do anything special.

Josef "Jeff" Sipek.

-- 
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
		- Brian W. Kernighan 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ