Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them

2010-06-27 Thread Christoph Hellwig
On Sun, Jun 27, 2010 at 11:47:21PM +0530, Aneesh Kumar K. V wrote: NFS ganesha pNFS also had a requirement for getting i_generation and inode number in userspace. So may be we should now look at updating stat or add a variant syscall that include i_generation and create time in the return

Re: [PATCH 12/18] xstat: Add a dentry op to handle automounting rather than abusing follow_link() [ver #6]

2010-07-18 Thread Christoph Hellwig
Moving this out of -follow_link is a good idea, but please submit this as a separate patch series, as it has very little to do with stat(). -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at

[PATCH] cifs: truncate fallout

2010-07-18 Thread Christoph Hellwig
setattr call, once opencoded in cifs_vmtruncate, and once using the VFS helpers? Question 2: what is supposed to be protected by i_lock in cifs_vmtruncate? Do we need it around the call to inode_change_ok? Signed-off-by: Christoph Hellwig h...@lst.de Index: linux-2.6/fs/cifs/inode.c

Re: [PATCH 01/15] cifs: eliminate redundant xdev check in cifs_rename

2010-08-25 Thread Christoph Hellwig
On Wed, Aug 25, 2010 at 11:34:07AM -0500, Steve French wrote: On Fri, Aug 20, 2010 at 2:31 PM, Jeff Layton jlay...@redhat.com wrote: The VFS always checks that the source and target of a rename are on the same vfsmount, and hence have the same superblock. So, this check is redundant. Remove

Re: [PATCH 2/3] CIFS: New read cache mechanism

2010-09-28 Thread Christoph Hellwig
On Mon, Sep 27, 2010 at 10:31:54PM +0400, Pavel Shilovsky wrote: Add cifs_sync_read call to provide reading from the cache if we have at least Level II oplock and otherwise - reading from the server. This still gives inconsistent results for aio or vectored reads. -- To unsubscribe from this

Re: [PATCH] cifs: set backing_dev_info on new S_ISREG inodes

2010-09-29 Thread Christoph Hellwig
On Wed, Sep 29, 2010 at 09:49:54AM -0400, Jeff Layton wrote: Testing on very recent kernel (2.6.36-rc6) made this warning pop: WARNING: at fs/fs-writeback.c:87 inode_to_bdi+0x65/0x70() Hardware name: Dirtiable inode bdi default != sb bdi cifs ...the following patch fixes it

Re: [PATCH] cifs: cifs_flush should wait for writeback to complete before proceeding

2010-10-04 Thread Christoph Hellwig
On Sat, Sep 25, 2010 at 08:16:44AM -0400, Jeff Layton wrote: Hmm...there is one problem with this scheme. __fput ignores the error return from -release. Only the errors from -flush will be returned to userspace. So if we only filemap_fdatawait in the -release op, then we have the potential to

Re: [PATCH] handle extended attribute name cifsacl to generate cifs acl blob

2010-10-12 Thread Christoph Hellwig
: Christoph Hellwig h...@lst.de Subject: [PATCH] cifs: use xattr handlers Rewrite the cifs xattr code to use the generic xattr dispatch handlers and clean up the code using it. Signed-off-by: Christoph Hellwig h...@lst.de Index: linux-2.6/fs/cifs/Makefile

Re: [PATCH 10/15] cifs: convert GlobalSMBSeslock from a rwlock to regular spinlock

2010-10-12 Thread Christoph Hellwig
Suresh, any chance you could only quote short, relevant portions of the patch? Your full quotes are almost unreadable. -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 2/4] CIFS: Invalidate inode pages on the last close

2010-10-26 Thread Christoph Hellwig
And please, no camel case for new struct members (or types or function names for that matter) -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/6] CIFS: Make read call work with strict cache mode (try #2)

2010-11-28 Thread Christoph Hellwig
Your patch arbitrarily shortens the read to the first vector. While short reads for regular files are fine with Posix, it will break a lot of userspace applications. -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More

Re: [PATCH] cifs: add mount option to handle stat() failures by 32-bit apps

2011-01-11 Thread Christoph Hellwig
On Tue, Jan 11, 2011 at 04:10:37PM +0530, Suresh Jayaraman wrote: ..compiled without LFS support, but running on 64-bit kernel. Currently, when a broken (compiled without LFS support) 32-bit application on a 64-bit kernel tries to do a stat(), it fails with -EOVERFLOW error. This problem

Re: stable page writes: wait_on_page_writeback and packet signing

2011-03-09 Thread Christoph Hellwig
On Wed, Mar 09, 2011 at 08:41:03PM -0500, Trond Myklebust wrote: So what if the server crashes, or you get some other transient error? I don't think the CIFS world cares. E.g. a Samba in default configuration never even bothers to do a fsync on the underlying server, which to me implies data

Re: [CIFS] various endian fixes to cifs

2011-03-13 Thread Christoph Hellwig
On Sat, Mar 12, 2011 at 11:05:51PM -0600, Steve French wrote: In checking new smb2 code for missing endian conversions, I noticed some endian errors had crept in over the last few releases into the cifs code (symlink, ntlmssp, posix lock, and less problematic warning in fscache). Patch

Re: Removing endian warning due to mixed endian use by cifs of smb_buf_length

2011-03-16 Thread Christoph Hellwig
On Tue, Mar 15, 2011 at 05:58:20PM -0500, Steve French wrote: I wanted to make the following trivial change to cifs's smb_sendv to allow smb2 (the smb2 code treats the RFC1001 length as always big endian, its native form, while cifs only converts it to bigendian at the last possible moment) to

Re: [PATCH] [CIFS] Allocating SMB2 mids (multiplex identifier structures)

2011-03-17 Thread Christoph Hellwig
Btw, what branch are these commits for? I dearly hope you're not trying to push half-assed code to mainline. Please do your development on a branch first, and once there is a useable implementation it can be reviewed and synced over. Take a look at pnfs development for example. -- To

Re: [PATCH] wait_for_free_request needs to wait on credits returned by server for SMB2

2011-03-17 Thread Christoph Hellwig
#ifdef CONFIG_CIFS_STATS2 atomic_inc(server-num_waiters); @@ -283,6 +284,20 @@ static int wait_for_free_request(struct TCP_Server_Info *server, atomic_dec(server-num_waiters); #endif spin_lock(GlobalMid_Lock); +#ifdef

Re: [PATCH] [CIFS] Allocating SMB2 mids (multiplex identifier structures)

2011-03-17 Thread Christoph Hellwig
On Thu, Mar 17, 2011 at 09:41:34AM -0500, Steve French wrote: On Thu, Mar 17, 2011 at 9:35 AM, Christoph Hellwig h...@infradead.org wrote: Btw, what branch are these commits for? ?I dearly hope you're not trying to push half-assed code to mainline. ?Please do your development on a branch

Re: [PATCH] [CIFS] Allocating SMB2 mids (multiplex identifier structures)

2011-03-17 Thread Christoph Hellwig
On Thu, Mar 17, 2011 at 09:54:48AM -0500, Steve French wrote: We have had over a year, including work by 4 developers in a distinct tree and got little meaningful feeback on features though until recently when it started showing up in cifs-2.6.git That's because just kept hiding your cruft

Re: [CIFS] [PATCH] consistently use smb_buf_length as be32 for cifs (try 3)

2011-03-17 Thread Christoph Hellwig
None of the other fields uses a wrapper, and the name is overly confusing. I'd suggest to just opencode the be32_add_cpu instead of wrapping it. -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: mids and cifs sendrcv2

2011-04-22 Thread Christoph Hellwig
On Fri, Apr 22, 2011 at 02:33:08PM +0400, Pavel Shilovsky wrote: I've just thought about to share tcp_server_info struct between different protocol connections. So, we can use cifs and smb2 connection on the same server and don't keep two socket connections. What do you think about to store

[PATCH] cifs: remove unused SMB2 config and mount options

2011-05-22 Thread Christoph Hellwig
There's no SMB2 support in the CIFS filesystem driver, so there's no need to have a config and mount option for it. Signed-off-by: Christoph Hellwig h...@lst.de Index: linux-2.6/fs/cifs/Kconfig === --- linux-2.6.orig/fs/cifs/Kconfig

Re: [PATCH] cifs: mark CONFIG_CIFS_NFSD_EXPORT as BROKEN

2011-05-22 Thread Christoph Hellwig
On Sun, May 22, 2011 at 07:55:24AM -0400, Jeff Layton wrote: This will never work properly with CIFS, as the protocol has no ability whatsoever for looking up files by filehandle. It *might* be possible to eventually do this with SMB2, but that remains to be seen. For now, it just plain

Re: [PATCH] cifs: mark CONFIG_CIFS_NFSD_EXPORT as BROKEN

2011-05-23 Thread Christoph Hellwig
On Mon, May 23, 2011 at 01:21:35PM -0500, Steve French wrote: Until Peter's Linux NFS fix is in - aren't we in that situation already with other fs. That patch is not going to help with the fundamental problem that you won't be able to ever find an inode that went out of cache. In short cifs

guest mount crashes current git HEAD

2011-05-25 Thread Christoph Hellwig
Trying to mount a local shared in my VM I can trivially crash cifs: qemu1:~# mount -t cifs 127.0.0.1:test /mnt/scratch/ -o guest [ 55.477707] CIFS VFS: default security mechanism requested. The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 2.6.41 [

Re: [PATCH] CIFS: Fix kernel crash on simultaneous mount/umount calls

2011-06-11 Thread Christoph Hellwig
one of these two processes process umount call. So, it comes to cifs_put_super, calls cifs_umount and then calls kfree(cifs_sb). In the same time, another process comes into cifs_do_mount and calls sget(). Then it appers into cifs_match_super that thinks that all structures like server, ses,

Re: [PATCH 1/5] CIFS: Move buffer allocation to a separate function

2011-06-24 Thread Christoph Hellwig
On Fri, Jun 24, 2011 at 10:51:53AM +0400, Pavel Shilovsky wrote: +static bool +allocate_buffers(char **pbigbuf, char **psmallbuf, unsigned int size, + bool isLargeBuf) No p-prefixes for pointers, and no camelCase, please. +{ + char *bigbuf = *pbigbuf, *smallbuf =

Re: [PATCH 4/5] CIFS: Move mid search to a separate function

2011-06-24 Thread Christoph Hellwig
+static struct mid_q_entry * + int *length, bool isLargeBuf, bool *isMultiRsp, char **pbigbuf) +{ Same comment for variable naming as for the first patch applies. + struct list_head *tmp, *tmp2; + struct mid_q_entry *mid_entry = NULL; + + spin_lock(GlobalMid_Lock);

[PATCH 1/4] cifs: cleanup cifs_filldir

2011-07-16 Thread Christoph Hellwig
Use sensible variable names and formatting and remove some superflous checks on entry. Signed-off-by: Christoph Hellwig h...@lst.de Index: linux-2.6/fs/cifs/readdir.c === --- linux-2.6.orig/fs/cifs/readdir.c2011-05-22 13:13

[PATCH 3/4] cifs: use cifs_dirent to replace cifs_get_name_from_search_buf

2011-07-16 Thread Christoph Hellwig
This allows us to parse the on the wire structures only once in cifs_filldir. Signed-off-by: Christoph Hellwig h...@lst.de Index: linux-2.6/fs/cifs/readdir.c === --- linux-2.6.orig/fs/cifs/readdir.c2011-05-22 13:32:40.456945333

[PATCH 4/4] cifs: use cifs_dirent in cifs_save_resume_key

2011-07-16 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig h...@lst.de Index: linux-2.6/fs/cifs/readdir.c === --- linux-2.6.orig/fs/cifs/readdir.c2011-06-30 21:47:45.366190671 +0200 +++ linux-2.6/fs/cifs/readdir.c 2011-06-30 21:48:42.076189966 +0200

Re: smb2 work status

2011-07-16 Thread Christoph Hellwig
On Sat, Jul 16, 2011 at 01:29:22PM +0400, Pavel Shilovsky wrote: Jeff, Christoph, can you comment on this, please? I really don't like all that ifdef mess. I'm not quite sure how to fix in in general, though. For the inode operations it's fairly simple: just have a different set for smb2, the

Re: smb2 work status

2011-07-18 Thread Christoph Hellwig
On Mon, Jul 18, 2011 at 07:45:01PM +0400, Pavel Shilovsky wrote: If I understand you right, you mean to separate inode and file operations for smb2 into a different structures, set them once with ifdefs in cifs_set_ops() and keep them in smb2inode.c and smb2file.c files. That's the idea.

Re: [GIT] CIFS Fixes

2011-10-27 Thread Christoph Hellwig
Clear NAK. The SMB2 support has been posted a couple of days ago, and both Jeff and me as likely reviewers had been travelling during that time, nevermind that a totally new feature really needs more baking time than half a week. -- To unsubscribe from this list: send the line unsubscribe

Re: [GIT] CIFS Fixes

2011-10-27 Thread Christoph Hellwig
On Thu, Oct 27, 2011 at 05:07:22PM -0400, Christoph Hellwig wrote: Clear NAK. The SMB2 support has been posted a couple of days ago, and both Jeff and me as likely reviewers had been travelling during that time, nevermind that a totally new feature really needs more baking time than half

Re: Extended file stat: Splitting file- and fs-specific info?

2012-05-09 Thread Christoph Hellwig
On Wed, May 09, 2012 at 10:21:14AM +0100, David Howells wrote: Dave Chinner da...@fromorbit.com wrote: I don't think we want to expose the inode generation numbers. It is trivial to construct NFS file handles (usually just fsid, inode number and generation) with that information and hence

Re: Extended file stat: Splitting file- and fs-specific info?

2012-05-09 Thread Christoph Hellwig
On Wed, May 09, 2012 at 01:55:16PM +0200, Bernd Schubert wrote: The basic idea of generation numbers is to check if an inode was recycled, so only if the tuple of inode-number and generation-number matches we still have the same file. Kernel nfs NFS does not and should not look at the inode

Re: [PATCH 0/3] Add O_DENY* flags to fcntl and cifs

2012-12-07 Thread Christoph Hellwig
On Thu, Dec 06, 2012 at 10:26:28PM +0400, Pavel Shilovsky wrote: Network filesystems CIFS, SMB2.0, SMB3.0 and NFSv4 have such flags - this change can benefit cifs and nfs modules. While this change is ok for network filesystems, itsn't not targeted for local filesystems due security problems

Re: [PATCH v1 11/11] locks: give the blocked_hash its own spinlock

2013-06-04 Thread Christoph Hellwig
Having RCU for modification mostly workloads never is a good idea, so I don't think it makes sense to mention it here. If you care about the overhead it's worth trying to use per-cpu lists, though. -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to

Re: [Patch net-next v3 7/9] fs: use generic union inet_addr and helper functions

2013-08-19 Thread Christoph Hellwig
@@ -1900,17 +1901,9 @@ srcip_matches(struct sockaddr *srcaddr, struct sockaddr *rhs) { I think your new sockaddr_equal should be equivalent to to this srcip_matches, that is it should warn about and return false for unknown address families. -- To unsubscribe from this list: send the line

Re: setfacl fix

2013-11-16 Thread Christoph Hellwig
On Fri, Nov 15, 2013 at 08:53:12PM -0600, Steve French wrote: From: Steve French smfre...@gmail.com Date: Fri, 15 Nov 2013 20:41:32 -0600 Subject: [PATCH] [CIFS] setfacl removes part of ACL when setting POSIX ACLs to Samba setfacl over cifs mounts can remove the default ACL when setting

Re: setfacl fix

2013-11-18 Thread Christoph Hellwig
On Sat, Nov 16, 2013 at 03:38:09PM -0600, Steve French wrote: Makes sense to add a setfacl/getfacl test to xfstest and was trying to build updated xfstests and look at what has changed but ran into a strange error building xfstests and didn't see an obvious answer when googling for it. Any

should we propagate SMB error codes further?

2013-11-20 Thread Christoph Hellwig
I'm seeing same interesting errors running against a server from a big NAS vendor that shall remain unnamed: p224160.955651] CIFS VFS: Unexpected lookup error -5 [224161.298853] CIFS VFS: Unexpected lookup error -5 [224161.643559] CIFS VFS: Unexpected lookup error -5 [224161.992309] CIFS VFS:

Re: [GIT] CIFS Fixes

2013-11-20 Thread Christoph Hellwig
On Wed, Nov 20, 2013 at 09:54:21PM -0600, Steve French wrote: Small set of changes this time. As promised, the finish up of the copy offload support, and a small security feature for SMB3 needed to prevent certain types of downgrade attacks. The following changes since commit

Re: copy chunk preliminary results

2013-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2013 at 11:45:41AM +0100, David Disseldorp wrote: It depends on how the SMB server interprets the copy-chunk wire request. On Btrfs, Samba can translate the request into a BTRFS_IOC_CLONE_RANGE ioctl, in which case the same CoW semantics are observed[1]. See:

Re: [PATCH 1/3] statxat: Provide IOC flags for Windows fs attributes

2013-11-27 Thread Christoph Hellwig
On Tue, Nov 12, 2013 at 05:35:26PM +, David Howells wrote: Provide IOC flags for Windows fs attributes so that they can be retrieved (or even altered) using the FS_IOC_[GS]ETFLAGS ioctl and read using statxat(). As mentioned before we're running out of these flags and we already have a

Re: [PATCH 2/3] statxat: Add a system call to make extended file stats available

2013-11-27 Thread Christoph Hellwig
On Tue, Nov 12, 2013 at 05:35:34PM +, David Howells wrote: Add a system call to make extended file stats available, including file creation time, inode version and data version where available through the underlying filesystem. Adding the glibc list as a new stat version that can't be

Re: [PATCH 8/8] cifs: Add support for readlink on dfs shares under posix extensions

2013-11-27 Thread Christoph Hellwig
I was going to complain that no filesystem should implement readlink itself but use the generic wrappers around -follow_link, but it turns our you actually do implement follow_link through that query_link API. Please fix the subject, though. -- To unsubscribe from this list: send the line

Re: [PATCH 0/2] CIFS support for XFS test suite

2014-08-23 Thread Christoph Hellwig
On Sat, Aug 23, 2014 at 12:16:01PM +0400, Pavel Shilovsky wrote: These are two patches that adds CIFS support to XFS tests. The first patch adds -cifs command line argument and CIFS specific variables. The second patch setups a directory tree for possible CIFS specific tests. With these

Re: [PATCH 1/2] common: add cifs support

2014-08-23 Thread Christoph Hellwig
On Sat, Aug 23, 2014 at 12:16:02PM +0400, Pavel Shilovsky wrote: Pass -cifs argument from command line to enable cifs testing. Looks mostly fine, but a few nitpicks below: _mount_opts() { + case $FSTYP in Remove this spurious new empty line, please. - echo $TEST_DEV | grep -q

Re: [PATCH 03/10] locks: generic_delete_lease doesn't need a file_lock at all

2014-08-23 Thread Christoph Hellwig
, *flp); - Can you keep the tracepoint and modify it to not need the file_lock pointer? It really helped me with some debugging lately. Otherwise looks fine, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message

Re: [PATCH 06/10] locks: plumb an aux pointer into the setlease routines

2014-08-23 Thread Christoph Hellwig
On Sat, Aug 23, 2014 at 10:41:14AM -0400, Jeff Layton wrote: In later patches, we're going to add a new lock_manager_operation to finish setting up the lease while still holding the i_lock. To do this, we'll need to pass a little bit of info in the fcntl setlease case (primarily an fasync

Re: [PATCH 01/10] locks: close potential race in lease_get_mtime

2014-08-24 Thread Christoph Hellwig
be freed. Ensure that that doesn't occur by taking the i_lock before trying to check the lease. Looks good. Also looks way cleaner than before by being just a tad more verbose.. Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line unsubscribe linux-cifs

Re: [PATCH 02/10] nfsd: fix potential lease memory leak in nfs4_setlease

2014-08-24 Thread Christoph Hellwig
...@primarydata.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 04/10] locks: clean up vfs_setlease kerneldoc comments

2014-08-24 Thread Christoph Hellwig
On Sat, Aug 23, 2014 at 10:41:12AM -0400, Jeff Layton wrote: Some of the latter paragraphs seem ambiguous and just plain wrong. In particular the break_lease comment makes no sense. We call break_lease (and break_deleg) from all sorts of vfs-layer functions, so there is clearly such a method.

Re: [PATCH 05/10] nfsd: don't keep a pointer to the lease in nfs4_file

2014-08-24 Thread Christoph Hellwig
always set that at the same time so it will have the same semantics. Signed-off-by: Jeff Layton jlay...@primarydata.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord

Re: [PATCH 06/10] locks: plumb an aux pointer into the setlease routines

2014-08-24 Thread Christoph Hellwig
On Sun, Aug 24, 2014 at 06:08:01AM -0400, Jeff Layton wrote: Can you just return -EEXIST if reusing an existing one and make it a normal private pointer a we use elsewhere? That sounds a little confusing... We have two pointers we pass down to generic_setlease: the file_lock itself

Re: [PATCH 08/10] locks: move i_lock acquisition into generic_*_lease handlers

2014-08-24 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig h...@lst.de Some comments on further work I'd like to see in this area, though: + spin_lock(inode-i_lock); + time_out_leases(inode); for (before = inode-i_flock; ((fl = *before) != NULL) IS_LEASE(fl

Re: [PATCH 09/10] locks: move freeing of leases outside of i_lock

2014-08-24 Thread Christoph Hellwig
On Sat, Aug 23, 2014 at 10:41:17AM -0400, Jeff Layton wrote: There was only one place where we still could free a file_lock while holding the i_lock -- lease_modify. Add a new list_head argument to the lm_change operation, pass in a private list when calling it, and fix those callers to

Re: [PATCH 00/10] locks/nfsd: internal lease API overhaul

2014-08-24 Thread Christoph Hellwig
One more wishlist item in addition to the one mentioned in the patches: - add a return value to lm_break so that the lock manager can tell the core code you can delete this lease right now. That gets rid of the games with the timeout which require all kinds of race avoidance code in

Re: [PATCH 08/10] locks: move i_lock acquisition into generic_*_lease handlers

2014-08-24 Thread Christoph Hellwig
On Sun, Aug 24, 2014 at 09:06:34AM -0700, Christoph Hellwig wrote: We really should split a lm_release from lm_change, the way it is used is highly confusing. In addition I think a lot of code currently in lease_modify should move here instead, e.g. something like: At this point the old

Re: [PATCH 07/10] locks: define a lm_setup handler for leases

2014-08-26 Thread Christoph Hellwig
On Sun, Aug 24, 2014 at 09:19:53PM -0400, Jeff Layton wrote: I don't think this is a good idea. The errors in __f_setown come from the security modules, and they could change easily. If you can convince the LSM people to change their file_set_fowner routine to return void we could change

Re: [PATCH 00/10] locks/nfsd: internal lease API overhaul

2014-08-26 Thread Christoph Hellwig
On Sun, Aug 24, 2014 at 09:43:01PM -0400, Jeff Layton wrote: - add a return value to lm_break so that the lock manager can tell the core code you can delete this lease right now. That gets rid of the games with the timeout which require all kinds of race avoidance code in the

Re: [PATCH v2 3/3] cifs: skip tests that need POSIX support for nounix mounts

2014-08-27 Thread Christoph Hellwig
On Wed, Aug 27, 2014 at 12:28:38AM +0400, Pavel Shilovsky wrote: CIFS/SMB protocol without POSIX extensions doesn't support operations with symbolic links and advisory byte-range locks from the same process. Add a check for nounix mounts and use it in generic tests that require such

Re: [PATCH v2 3/3] cifs: skip tests that need POSIX support for nounix mounts

2014-08-27 Thread Christoph Hellwig
On Wed, Aug 27, 2014 at 11:17:25AM -0500, Steve French wrote: Do you know a more standardized way to test if symlink support is available? We don't really have the same thing as the FS and Device capability ioctls that Microsoft offers, but even for them, they don't export whether symlink

Re: [PATCH v2 3/3] cifs: skip tests that need POSIX support for nounix mounts

2014-08-27 Thread Christoph Hellwig
On Wed, Aug 27, 2014 at 11:49:56PM +0400, Pavel Shilovsky wrote: So for these tests we need two check functions: _require_symlink for 005, 023, 024, 025 and _require_fcntl for 131. Right? More or less. I'd call the second one _require_fcntl_locks as fcntl is a multiplexer for tons of unrelated

Re: [PATCH v2 1/3] generic/013: encapsulate remount during cleanup

2014-08-28 Thread Christoph Hellwig
On Wed, Aug 27, 2014 at 12:28:36AM +0400, Pavel Shilovsky wrote: The existing code calls remount for $TEST_DEV with constantly defined mount options. This can fail if a user specifies different mount options. Fix this by using new _test_remount() call that remounts $TEST_DEV. Looks technically

Re: [PATCH v2 2/3] common: add cifs support

2014-08-28 Thread Christoph Hellwig
On Wed, Aug 27, 2014 at 12:28:37AM +0400, Pavel Shilovsky wrote: +- You can explicitly specify NFS or CIFS, otherwise the filesystem type will + be autodetected from $TEST_DEV: ./check -nfs [test(s)] Can you take care of mentioning tmpfs as well, looks like it didn't get

Re: Latest xfstest results

2014-08-29 Thread Christoph Hellwig
Seems like most of your issues are time stamp updates, so you should look into that area a lot more. Some that I know off head what the issues are: On Fri, Aug 29, 2014 at 10:33:14AM -0500, Steve French wrote: For 192 delta1 time should be 40 (this seems to work intermittently) QA output

Re: [PATCH][v2][CIFS] Fix setting time before epoch (negative time values)

2014-09-15 Thread Christoph Hellwig
/* Subtract the NTFS time offset, then convert to 1s intervals. */ -u64 t; +s64 t = le64_to_cpu(ntutc) - NTFS_TIME_OFFSET; + +/* The patch looks whitespace damaged. -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to

Re: [PATCH] [SMB3] Allow mknod and mkfifo on SMB2/SMB3 mounts

2014-09-22 Thread Christoph Hellwig
Is there any good reason to require a mount option for these extensions? -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 02/10] locks: have locks_release_file use flock_lock_file to release generic flock locks

2015-01-09 Thread Christoph Hellwig
On Thu, Jan 08, 2015 at 10:34:17AM -0800, Jeff Layton wrote: ...instead of open-coding it and removing flock locks directly. This simplifies some coming interim changes in the following patches when we have different file_lock types protected by different spinlocks. It took me quite a while to

Re: [PATCH v2 04/10] locks: move flock locks to file_lock_context

2015-01-09 Thread Christoph Hellwig
void ceph_count_locks(struct inode *inode, int *fcntl_count, int *flock_count) { struct file_lock *lock; + struct file_lock_context *ctx; *fcntl_count = 0; *flock_count = 0; + spin_lock(inode-i_lock); Seems like moving the locking around is unrelated to

Re: [PATCH v2 02/10] locks: have locks_release_file use flock_lock_file to release generic flock locks

2015-01-09 Thread Christoph Hellwig
On Fri, Jan 09, 2015 at 06:42:57AM -0800, Jeff Layton wrote: I'd suggest keeping an open coded loop in locks_remove_flock, which should both be more efficient and easier to review. I don't know. On the one hand, I rather like keeping all of the lock removal logic in a single spot. On

Re: [PATCH 1/9] vfs: add COPY_FILE_CLONE_ONLY flag

2015-11-13 Thread Christoph Hellwig
On Sun, Oct 25, 2015 at 07:17:08AM +0800, Peng Tao wrote: > To tell file system not to return partial success in the > .copy_file_range method. This is useful to implement the > clone (or reflink) functionality. The return value is only part of it, the other part is to make it atomic. Thus I

Re: [PATCH v15 00/22] Richacls (Core and Ext4)

2015-11-10 Thread Christoph Hellwig
On Mon, Nov 09, 2015 at 12:08:41PM +0100, Andreas Gruenbacher wrote: > Here is another update to the richacl patch queue. This posting contains > the patches ready to be merged; the patches later in the queue still need > some more review. It still has the same crappy fs interfaces with lots of

Re: [PATCH v15 00/22] Richacls (Core and Ext4)

2015-11-10 Thread Christoph Hellwig
On Tue, Nov 10, 2015 at 01:39:52PM +0100, Andreas Gruenbacher wrote: > > It still has the same crappy fs interfaces with lots of boilerplate > > code > > Could you please be more specific so that I can trace this complaint > to some actual code? if (IS_RICHACL()) richacl_foo() else

Re: [PATCH 2/4] vfs: pull btrfs clone API to vfs layer

2015-12-07 Thread Christoph Hellwig
On Sun, Dec 06, 2015 at 04:53:31PM -0800, Darrick J. Wong wrote: > > + if (S_ISDIR(inode_in->i_mode) || S_ISDIR(inode_out->i_mode)) > > + return -EISDIR; > > + if (!S_ISREG(inode_in->i_mode) || !S_ISREG(inode_out->i_mode)) > > + return -EOPNOTSUPP; > > I thought we were

Re: [PATCH 1/4] locks: new locks_mandatory_area calling convention

2015-12-08 Thread Christoph Hellwig
On Tue, Dec 08, 2015 at 04:05:04AM +, Al Viro wrote: > Where the hell would truncate(2) get struct file, anyway? IOW, the inode > argument is _not_ pointless; re-added. Oh, right. Interestingly is seems like xfstests has no coverage of this code path at all. -- To unsubscribe from this

[PATCH 2/4] vfs: pull btrfs clone API to vfs layer

2015-12-03 Thread Christoph Hellwig
on top of the recent clone_file_range infrastructure. The converse isn't true and the clone_file_range system call could try clone file range as a first attempt to copy, something that further patches will enable. Based on earlier work from Peng Tao. Signed-off-by: Christoph Hellwig <h...@lst

[PATCH 4/4] nfsd: implement the NFSv4.2 CLONE operation

2015-12-03 Thread Christoph Hellwig
This is basically a remote version of the btrfs CLONE operation, so the implementation is fairly trivial. Made even more trivial by stealing the XDR code and general framework Anna Schumaker's COPY prototype. Signed-off-by: Christoph Hellwig <h...@lst.de> Acked-by: J. Bruce Fields

[PATCH 3/4] nfsd: Pass filehandle to nfs4_preprocess_stateid_op()

2015-12-03 Thread Christoph Hellwig
From: Anna Schumaker <anna.schuma...@netapp.com> This will be needed so COPY can look up the saved_fh in addition to the current_fh. Signed-off-by: Anna Schumaker <anna.schuma...@netapp.com> Signed-off-by: Christoph Hellwig <h...@lst.de> Acked-by: J. Bruce Fields <bfie...@

move btrfs clone ioctls to common code V2

2015-12-03 Thread Christoph Hellwig
This patch set moves the existing btrfs clone ioctls that other file system have started to implement to common code, and allows the NFS server to export this functionality to remote systems. This work is based originally on my NFS CLONE prototype, which reused code from Anna Schumaker's NFS COPY

[PATCH 1/4] locks: new locks_mandatory_area calling convention

2015-12-03 Thread Christoph Hellwig
Pass a loff_t end for the last byte instead of the 32-bit count parameter to allow full file clones even on 32-bit architectures. While we're at it also drop the pointless inode argument and simplify the read/write selection. Signed-off-by: Christoph Hellwig <h...@lst.de> Acked-by: J.

Re: vfs: move btrfs clone ioctls to common code

2015-12-03 Thread Christoph Hellwig
On Wed, Dec 02, 2015 at 11:40:13AM -0600, Steve French wrote: > If the copy_file_range is allowed to use any offload mechanism then > cifs.ko could be changed as follows, to fallback among the three > possible mechanisms depending on what the target supports. How reliable are the fallbacks? E.g.

Re: vfs: move btrfs clone ioctls to common code

2015-12-01 Thread Christoph Hellwig
Hi Steve, we have two APIs in Linux: - the copy_file_range syscall which just is a "do a copy by any means" - the btrfs clone ioctls which have stricter semantics that very much expect a reflink-like operation I plan to also wire up copy_file_range to try the clone_file_range method first

Re: [PATCH 2/4] vfs: pull btrfs clone API to vfs layer

2015-12-14 Thread Christoph Hellwig
On Wed, Dec 09, 2015 at 12:40:33PM -0800, Darrick J. Wong wrote: > I tried this patch series on ppc64 (w/ 32-bit powerpc userland) and I think > it needs to fix up the compat ioctl to make the vfs call... Might need a proper signoff for Al, unless he wants to directly fold it.. -- To unsubscribe

[PATCH 5/4] vfs: return EINVAL for unsupported file types in clone

2015-12-14 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> diff --git a/fs/read_write.c b/fs/read_write.c index 1f0d3f1..6268ebc 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -1528,7 +1528,7 @@ int vfs_clone_file_range(struct file *file_in, loff_t pos_in, if (S_ISDIR(inode_in-&

[PATCH 2/5] locks: new locks_mandatory_area calling convention

2015-11-26 Thread Christoph Hellwig
Pass a loff_t end for the last byte instead of the 32-bit count parameter to allow full file clones even on 32-bit architectures. While we're at it also drop the pointless inode argument and simplify the read/write selection. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/l

[PATCH 3/5] vfs: pull btrfs clone API to vfs layer

2015-11-26 Thread Christoph Hellwig
to piggyback them on top of the recent clone_file_range infrastructure. Based on earlier work from Peng Tao. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/btrfs/ctree.h | 3 +- fs/btrfs/file.c | 1 + fs/btrfs/ioctl.c | 49 ++ fs/i

[PATCH 1/5] cifs: implement clone_file_range operation

2015-11-26 Thread Christoph Hellwig
And drop the fake support for the btrfs CLONE ioctl - SMB2 copies are chunked and do not actually implement clone semantics! Heavily based on a previous patch from Peng Tao. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/cifs/cifsfs.c | 25 ++ fs/cifs/cifsfs.h | 4 +

[PATCH 5/5] nfsd: implement the NFSv4.2 CLONE operation

2015-11-26 Thread Christoph Hellwig
This is basically a remote version of the btrfs CLONE operation, so the implementation is fairly trivial. Made even more trivial by stealing the XDR code and general framework Anna Schumaker's COPY prototype. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/nfsd/nfs4proc.c

[PATCH 4/5] nfsd: Pass filehandle to nfs4_preprocess_stateid_op()

2015-11-26 Thread Christoph Hellwig
From: Anna Schumaker This will be needed so COPY can look up the saved_fh in addition to the current_fh. Signed-off-by: Anna Schumaker --- fs/nfsd/nfs4proc.c | 16 +--- fs/nfsd/nfs4state.c | 5 ++--- fs/nfsd/state.h | 4

Re: [PATCH 2/5] locks: new locks_mandatory_area calling convention

2015-11-30 Thread Christoph Hellwig
On Mon, Nov 30, 2015 at 05:38:30PM -0500, J. Bruce Fields wrote: > > + if (size < inode->i_size) { > > + return locks_mandatory_area(filp, size, inode->i_size - 1, > > + true); > > + } else { > > + return locks_mandatory_area(filp, inode->i_size,

Re: [RFC][PATCH 00/12] Enhanced file stat system call

2015-11-24 Thread Christoph Hellwig
On Fri, Nov 20, 2015 at 05:19:31PM +0100, Martin Steigerwald wrote: > I know its mostly relevant for just for FAT32, but on any account rather than > trying to write 4 GiB and then file, it would be good to at some time get a > dialog at the beginning of the copy. pathconf/fpathconf is supposed

Re: [RFC][PATCH 00/12] Enhanced file stat system call

2015-11-24 Thread Christoph Hellwig
On Fri, Nov 20, 2015 at 08:50:22AM -0800, Casey Schaufler wrote: > How about relevant xattrs? SELinux context, ACL, that sort of thing. > The fact that these are optional should be taken care of by (4). Those are not simple, fixed size stat data and would make the system call a giant mess. -- To

Re: [RFC][PATCH 00/12] Enhanced file stat system call

2015-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2015 at 09:48:22AM +0100, Martin Steigerwald wrote: > It might be interesting for BTRFS as well, to be able to ask what amount of > free space there currently is *at* a given path. Cause with BTRFS and > Subvolumes this may differ between different paths. We can handle this