Re: openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Pavel Machek
Hi! > >>User wants to test for a file with name "foo.txt" > >> > >>* create "foo.txt~" (or whatever) > >>* write contents into "foo.txt~" > >>* rename "foo.txt~" to "foo.txt" > >> > >>Until rename is done, the file does not exists and is not complete. > >>You will potentially have a garbage file

Re: openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Ric Wheeler
On 03/31/2013 07:18 PM, Pavel Machek wrote: Hi! Take a look at how many actively used filesystems out there that have some variant of sillyrename(), and explain what you want to do in those cases. Well. Yes, there are non-unix filesystems around. You have to deal with silly files on them, and

Re: openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Pavel Machek
Hi! > Take a look at how many actively used filesystems out there that have > some variant of sillyrename(), and explain what you want to do in those > cases. > >>>Well. Yes, there are non-unix filesystems around. You have to deal > >>>with silly files on them, and this will not be

Re: openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Ric Wheeler
On 03/31/2013 06:50 PM, Pavel Machek wrote: On Sun 2013-03-31 18:44:53, Myklebust, Trond wrote: On Sun, 2013-03-31 at 20:32 +0200, Pavel Machek wrote: Hmm. open_deleted_file() will still need to get a directory... so it will still need a path. Perhaps open("/foo/bar/mnt", O_DELETED) would be

Re: openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Pavel Machek
On Sun 2013-03-31 18:44:53, Myklebust, Trond wrote: > On Sun, 2013-03-31 at 20:32 +0200, Pavel Machek wrote: > > > > > > Hmm. open_deleted_file() will still need to get a directory... so it > > > > > > will still need a path. Perhaps open("/foo/bar/mnt", O_DELETED) > > > > > > would > > > > > >

Re: openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Myklebust, Trond
On Sun, 2013-03-31 at 20:32 +0200, Pavel Machek wrote: > > > > > Hmm. open_deleted_file() will still need to get a directory... so it > > > > > will still need a path. Perhaps open("/foo/bar/mnt", O_DELETED) would > > > > > be acceptable interface? > > > > > > > > ...and what's the big plan to

openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Pavel Machek
> > > > Hmm. open_deleted_file() will still need to get a directory... so it > > > > will still need a path. Perhaps open("/foo/bar/mnt", O_DELETED) would > > > > be acceptable interface? > > > > > > ...and what's the big plan to make this work on anything other than ext4 > > > and btrfs? > >

openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Pavel Machek
Hmm. open_deleted_file() will still need to get a directory... so it will still need a path. Perhaps open(/foo/bar/mnt, O_DELETED) would be acceptable interface? ...and what's the big plan to make this work on anything other than ext4 and btrfs? Deleted but open files

Re: openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Myklebust, Trond
On Sun, 2013-03-31 at 20:32 +0200, Pavel Machek wrote: Hmm. open_deleted_file() will still need to get a directory... so it will still need a path. Perhaps open(/foo/bar/mnt, O_DELETED) would be acceptable interface? ...and what's the big plan to make this work on anything

Re: openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Pavel Machek
On Sun 2013-03-31 18:44:53, Myklebust, Trond wrote: On Sun, 2013-03-31 at 20:32 +0200, Pavel Machek wrote: Hmm. open_deleted_file() will still need to get a directory... so it will still need a path. Perhaps open(/foo/bar/mnt, O_DELETED) would be acceptable interface?

Re: openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Ric Wheeler
On 03/31/2013 06:50 PM, Pavel Machek wrote: On Sun 2013-03-31 18:44:53, Myklebust, Trond wrote: On Sun, 2013-03-31 at 20:32 +0200, Pavel Machek wrote: Hmm. open_deleted_file() will still need to get a directory... so it will still need a path. Perhaps open(/foo/bar/mnt, O_DELETED) would be

Re: openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Pavel Machek
Hi! Take a look at how many actively used filesystems out there that have some variant of sillyrename(), and explain what you want to do in those cases. Well. Yes, there are non-unix filesystems around. You have to deal with silly files on them, and this will not be different. So this would

Re: openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Ric Wheeler
On 03/31/2013 07:18 PM, Pavel Machek wrote: Hi! Take a look at how many actively used filesystems out there that have some variant of sillyrename(), and explain what you want to do in those cases. Well. Yes, there are non-unix filesystems around. You have to deal with silly files on them, and

Re: openat(..., AT_UNLINKED) was Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Pavel Machek
Hi! User wants to test for a file with name foo.txt * create foo.txt~ (or whatever) * write contents into foo.txt~ * rename foo.txt~ to foo.txt Until rename is done, the file does not exists and is not complete. You will potentially have a garbage file to clean up if the program (or