[PATCH 01/19] orangefs: implement xattr cache

2018-10-07 Thread Martin Brandenburg
reduces traffic to the server. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 1 + fs/orangefs/orangefs-kernel.h | 10 fs/orangefs/super.c | 9 +++ fs/orangefs/xattr.c | 104 ++ 4 files changed, 124 insertions

[PATCH 03/19] orangefs: simplify orangefs_inode_getattr interface

2018-10-07 Thread Martin Brandenburg
and use the cached size. All of the in-kernel callers that wanted size did not want a cached size. Now a getattr cannot use the cached size if it wants size at all. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c| 17 - fs/orangefs/inode.c

[PATCH 05/19] orangefs: hold i_lock during inode_getattr

2018-10-07 Thread Martin Brandenburg
This should be a no-op now. When inode writeback works, this will prevent a getattr from overwriting inode data while an inode is transitioning to dirty. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 4 ++-- fs/orangefs/orangefs-utils.c | 33

[PATCH 08/19] orangefs: reorganize setattr functions to track attribute changes

2018-10-07 Thread Martin Brandenburg
r that lock if getattr_time ok or attr_valid, unlock and return else, copy in update getattr_time unlock Signed-off-by: Martin Brandenburg --- fs/orangefs/acl.c | 4 +- fs/orangefs/inode.c | 76 ++- fs/orangefs/n

[PATCH 15/19] orangefs: avoid fsync service operation on flush

2018-10-07 Thread Martin Brandenburg
request. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 5eda483263ae..d5ecfea3288a 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -596,7

[PATCH 10/19] orangefs: service ops done for writeback are not killable

2018-10-07 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-kernel.h | 1 + fs/orangefs/orangefs-utils.c | 2 +- fs/orangefs/waitqueue.c | 18 ++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h

[PATCH 12/19] orangefs: implement writepage

2018-10-07 Thread Martin Brandenburg
Now orangefs_inode_getattr fills from cache if an inode has dirty pages. also if attr_valid and dirty pages and !flags, we spin on inode writeback before returning if pages still dirty after: should it be other way Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 77

[PATCH 11/19] orangefs: migrate to generic_file_read_iter

2018-10-07 Thread Martin Brandenburg
truncate_inode_pages now in the write path so a subsequent read sees the new data. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c| 68 --- fs/orangefs/inode.c | 63 fs/orangefs/orangefs-kernel.h | 13

[PATCH 17/19] orangefs: implement writepages

2018-10-07 Thread Martin Brandenburg
Go through pages and look for a consecutive writable region. After finding 128 consecutive writable pages or when finding a non-consecutive region, do the write. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c| 1 + fs/orangefs/inode.c | 144

[PATCH 16/19] orangefs: use kmem_cache for orangefs_write_request

2018-10-07 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 10 +- fs/orangefs/orangefs-cache.c | 24 ++-- fs/orangefs/orangefs-kernel.h | 6 -- fs/orangefs/orangefs-mod.c| 10 +- 4 files changed, 36 insertions(+), 14 deletions(-) diff

[PATCH 13/19] orangefs: skip inode writeout if nothing to write

2018-10-07 Thread Martin Brandenburg
Would happen if an inode is dirty but whatever happened is not something that can be written out to OrangeFS. Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-utils.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c

[PATCH 07/19] orangefs: let setattr write to cached inode

2018-10-07 Thread Martin Brandenburg
This is a fairly big change, but ultimately it's not a lot of code. Implement write_inode and then avoid the call to orangefs_inode_setattr within orangefs_setattr. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 11 +++ fs/orangefs/super.c | 16 2

[PATCH 19/19] orangefs: do writepages_work if a single page must be written

2018-10-07 Thread Martin Brandenburg
Otherwise the next page can't possibly be an append and it'll just sit there and write pages one by one until it flushes the saved region at the very end. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/orangefs

[PATCH 06/19] orangefs: set up and use backing_dev_info

2018-10-07 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/super.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c index 4c36481208f5..61bec955b285 100644 --- a/fs/orangefs/super.c +++ b/fs/orangefs/super.c @@ -406,15

[PATCH 09/19] orangefs: remove orangefs_readpages

2018-10-07 Thread Martin Brandenburg
It's a copy of the loop which would run in read_pages from mm/readahead.c. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 39 +-- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c

[PATCH 04/19] orangefs: update attributes rather than relying on server

2018-10-07 Thread Martin Brandenburg
since it does not yet know the pending setattr. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 10 ++ fs/orangefs/namei.c | 7 ++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 3ab6e5126899..aec17635a50f 1

[PATCH 18/19] orangefs: use client-core buffer size to determine writepages count

2018-10-07 Thread Martin Brandenburg
The previous fixed count of 128 was arbitrary. I see about a 10% performance increase on large block size I/O since the count is now 1024 (given the default four megabyte client-core buffer). Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 27 --- 1 file

[PATCH 02/19] orangefs: do not invalidate attributes on inode create

2018-10-07 Thread Martin Brandenburg
When an inode is created, we fetch attributes from the server. There is no need to turn around and invalidate them. No need to initialize attributes after the getattr either. Either it'll be exactly the same, or it'll be something else and wrong. Signed-off-by: Martin Brandenbur

[PATCH 00/19] [V2] orangefs: page cache

2018-10-07 Thread Martin Brandenburg
an improved releasepage implementation and a launder_page implementation. We also size the writepages buffer based on the client core buffer. However I'm not happy with the memory allocation in writepages. Mike, I know you've had some trouble with the original series. I'd like to know if t

[PATCH 14/19] orangefs: write range tracking

2018-10-07 Thread Martin Brandenburg
. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c| 12 +- fs/orangefs/inode.c | 267 ++ fs/orangefs/orangefs-kernel.h | 12 +- 3 files changed, 261 insertions(+), 30 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c

[PATCH 02/17] orangefs: do not invalidate attributes on inode create

2018-09-17 Thread Martin Brandenburg
When an inode is created, we fetch attributes from the server. There is no need to turn around and invalidate them. No need to initialize attributes after the getattr either. Either it'll be exactly the same, or it'll be something else and wrong. Signed-off-by: Martin Brandenbur

[PATCH 03/17] orangefs: simply orangefs_inode_getattr interface

2018-09-17 Thread Martin Brandenburg
and use the cached size. All of the in-kernel callers that wanted size did not want a cached size. Now a getattr cannot use the cached size if it wants size at all. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c| 17 - fs/orangefs/inode.c

[PATCH 01/17] orangefs: implement xattr cache

2018-09-17 Thread Martin Brandenburg
reduces traffic to the server. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 1 + fs/orangefs/orangefs-kernel.h | 10 fs/orangefs/super.c | 9 +++ fs/orangefs/xattr.c | 104 ++ 4 files changed, 124 insertions

[PATCH 04/17] orangefs: update attributes rather than relying on server

2018-09-17 Thread Martin Brandenburg
since it does not yet know the pending setattr. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 10 ++ fs/orangefs/namei.c | 7 ++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 3ab6e5126899..aec17635a50f 1

[PATCH 05/17] orangefs: hold i_lock during inode_getattr

2018-09-17 Thread Martin Brandenburg
This should be a no-op now. When inode writeback works, this will prevent a getattr from overwriting inode data while an inode is transitioning to dirty. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 4 ++-- fs/orangefs/orangefs-utils.c | 33

[PATCH 07/17] orangefs: let setattr write to cached inode

2018-09-17 Thread Martin Brandenburg
This is a fairly big change, but ultimately it's not a lot of code. Implement write_inode and then avoid the call to orangefs_inode_setattr within orangefs_setattr. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 11 +++ fs/orangefs/super.c | 16 2

[PATCH 09/17] orangefs: remove orangefs_readpages

2018-09-17 Thread Martin Brandenburg
It's a copy of the loop which would run in read_pages from mm/readahead.c. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 39 +-- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c

[PATCH 08/17] orangefs: reorganize setattr functions to track attribute changes

2018-09-17 Thread Martin Brandenburg
r that lock if getattr_time ok or attr_valid, unlock and return else, copy in update getattr_time unlock Signed-off-by: Martin Brandenburg --- fs/orangefs/acl.c | 4 +- fs/orangefs/inode.c | 76 ++- fs/orangefs/n

[PATCH 11/17] orangefs: migrate to generic_file_read_iter

2018-09-17 Thread Martin Brandenburg
truncate_inode_pages now in the write path so a subsequent read sees the new data. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c| 68 --- fs/orangefs/inode.c | 63 fs/orangefs/orangefs-kernel.h | 13

[PATCH 12/17] orangefs: implement writepage

2018-09-17 Thread Martin Brandenburg
Now orangefs_inode_getattr fills from cache if an inode has dirty pages. also if attr_valid and dirty pages and !flags, we spin on inode writeback before returning if pages still dirty after: should it be other way Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 77

[PATCH 10/17] orangefs: service ops done for writeback are not killable

2018-09-17 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-kernel.h | 1 + fs/orangefs/orangefs-utils.c | 2 +- fs/orangefs/waitqueue.c | 18 ++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h

[PATCH 16/17] orangefs: use kmem_cache for orangefs_write_request

2018-09-17 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 10 +- fs/orangefs/orangefs-cache.c | 24 ++-- fs/orangefs/orangefs-kernel.h | 6 -- fs/orangefs/orangefs-mod.c| 10 +- 4 files changed, 36 insertions(+), 14 deletions(-) diff

[PATCH 13/17] orangefs: skip inode writeout if nothing to write

2018-09-17 Thread Martin Brandenburg
Would happen if an inode is dirty but whatever happened is not something that can be written out to OrangeFS. Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-utils.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c

[PATCH 06/17] orangefs: set up and use backing_dev_info

2018-09-17 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/super.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c index 4c36481208f5..61bec955b285 100644 --- a/fs/orangefs/super.c +++ b/fs/orangefs/super.c @@ -406,15

[PATCH 15/17] orangefs: avoid fsync service operation on flush

2018-09-17 Thread Martin Brandenburg
request. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 5eda483263ae..d5ecfea3288a 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -596,7

[PATCH 14/17] orangefs: write range tracking

2018-09-17 Thread Martin Brandenburg
. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c| 12 +- fs/orangefs/inode.c | 243 ++ fs/orangefs/orangefs-kernel.h | 12 +- 3 files changed, 237 insertions(+), 30 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c

[PATCH 17/17] orangefs: implement writepages

2018-09-17 Thread Martin Brandenburg
Go through pages and look for a consecutive writable region. After finding 128 consecutive writable pages or when finding a non-consecutive region, do the write. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 135 +- fs/orangefs/orangefs

[PATCH 00/17] orangefs: page cache

2018-09-17 Thread Martin Brandenburg
ghtforward except for the need to separate writes from different uid/gid pairs due to the design of our server. Martin Brandenburg (17): orangefs: implement xattr cache orangefs: do not invalidate attributes on inode create orangefs: simply orangefs_inode_getattr interface orangefs: update

[PATCH] orangefs: reverse sense of revalidate is-inode-stale test

2018-01-26 Thread Martin Brandenburg
It was wrong. Signed-off-by: Martin Brandenburg --- fs/orangefs/dcache.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/orangefs/dcache.c b/fs/orangefs/dcache.c index ae782df5c063..c7aa5c923477 100644 --- a/fs/orangefs/dcache.c +++ b/fs/orangefs

[PATCH 1/7] orangefs: make orangefs_client_debug_init static

2018-01-26 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-debugfs.c | 2 +- fs/orangefs/orangefs-debugfs.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c index 1c59dff530de..67d531ad5a56 100644 --- a/fs

[PATCH 3/7] orangefs: remove ORANGEFS_KERNEL_DEBUG

2018-01-26 Thread Martin Brandenburg
It wasn't possible to enable it, and it would've had very little effect. Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-kernel.h | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kern

[PATCH 6/7] orangefs: remove unused code

2018-01-26 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-debug.h | 6 fs/orangefs/orangefs-kernel.h | 77 --- fs/orangefs/protocol.h| 45 - 3 files changed, 128 deletions(-) diff --git a/fs/orangefs/orangefs

[PATCH 5/7] ornagefs: make several *_operations structs static

2018-01-26 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/devorangefs-req.c | 52 +-- fs/orangefs/inode.c | 4 ++-- fs/orangefs/orangefs-kernel.h | 3 --- 3 files changed, 28 insertions(+), 31 deletions(-) diff --git a/fs/orangefs/devorangefs-req.c b

[PATCH 7/7] orangefs: create uapi interface

2018-01-26 Thread Martin Brandenburg
s/orangefs/*.h to include/uapi/linux/orangefs.h. Signed-off-by: Martin Brandenburg --- fs/orangefs/acl.c| 1 - fs/orangefs/dcache.c | 1 - fs/orangefs/devorangefs-req.c| 2 - fs/orangefs/dir.c| 1 - fs/orangefs/downcall.h | 137 --

[PATCH 0/7] orangefs uapi

2018-01-26 Thread Martin Brandenburg
he kernel doesn't need to know. Martin Brandenburg (7): orangefs: make orangefs_client_debug_init static orangefs: remove gossip_ldebug and gossip_lerr orangefs: remove ORANGEFS_KERNEL_DEBUG orangefs: make orangefs_make_bad_inode static ornagefs: make several *_operations structs st

[PATCH 4/7] orangefs: make orangefs_make_bad_inode static

2018-01-26 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-kernel.h | 2 -- fs/orangefs/orangefs-utils.c | 38 +++--- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h index

[PATCH 2/7] orangefs: remove gossip_ldebug and gossip_lerr

2018-01-26 Thread Martin Brandenburg
gossip_ldebug is unused. gossip_lerr is used in two places. The messages are unique so line numbers are unnecessary. Also remove support for compiling gossip messages out. It wasn't possible to enable it anyway. Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-debugfs.c

[PATCH for 4.15] orangefs: fix deadlock; do not write i_size in read_iter

2018-01-25 Thread Martin Brandenburg
d-off-by: Martin Brandenburg Cc: Al Viro Cc: Mike Marshall Cc: sta...@vger.kernel.org --- fs/orangefs/file.c| 7 ++- fs/orangefs/orangefs-kernel.h | 11 --- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 1668

[PATCH 1/2] orangefs: use list_for_each_entry_safe in purge_waiting_ops

2018-01-22 Thread Martin Brandenburg
set_op_state_purged can delete the op. Signed-off-by: Martin Brandenburg Cc: sta...@vger.kernel.org --- fs/orangefs/waitqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/orangefs/waitqueue.c b/fs/orangefs/waitqueue.c index 835c6e148afc..0577d6dba8c8 100644 --- a

[PATCH 2/2] orangefs: initialize op on loop restart in orangefs_devreq_read

2018-01-22 Thread Martin Brandenburg
to is not reinitialized, so if there are no more eligible ops on the list, the code runs again on the already handled op. This is triggered by interrupting a process while the op is being copied to the client-core. It's a fairly small window, but it's there. Signed-off-by: Martin Brand

[PATCH 0/2] orangefs: bugfixes for 4.15

2018-01-22 Thread Martin Brandenburg
Linus, I'd appreciate it if these can make it into 4.15 if possible. Both fix concurrency bugs I've found within the last week. Martin Brandenburg (2): orangefs: use list_for_each_entry_safe in purge_waiting_ops orangefs: initialize op on loop restart in orangefs_devreq_read f

[PATCH 01/18] orangefs: open code short single-use functions

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 95 +++--- 1 file changed, 19 insertions(+), 76 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 1668fd645c45..44879b1ff33e 100644 --- a

[PATCH 04/18] orangefs: do not invalidate attribute cache on setattr

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-utils.c | 4 1 file changed, 4 deletions(-) diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c index 97fe93129f38..553b3ded51cd 100644 --- a/fs/orangefs/orangefs-utils.c +++ b/fs

[PATCH 05/18] orangefs: reverse sense of revalidate is-inode-stale test

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg Signed-off-by: Martin Brandenburg --- fs/orangefs/dcache.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/orangefs/dcache.c b/fs/orangefs/dcache.c index ae782df5c063..c7aa5c923477 100644 --- a/fs/orangefs/dcache.c +++ b/fs

[PATCH 06/18] orangefs: move orangefs_address_operations to file.c

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 132 fs/orangefs/inode.c | 132 2 files changed, 132 insertions(+), 132 deletions(-) diff --git a/fs

[PATCH 07/18] orangefs: remove orangefs_readpages

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg It's a copy of the loop which runs if it's not implemented from read_pages from mm/readahead.c. Best to just use the generic code. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 39 +-- 1 file changed, 1

[PATCH 08/18] orangefs: make orangefs_inode_read static

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c| 6 ++ fs/orangefs/orangefs-kernel.h | 5 - 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 3e5d467e24e6..afb94ed7cef3 100644 --- a

[PATCH 10/18] orangefs: BUG_ON if i_mode invalid

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg This can't happen since it would have been caught (and a graceful error returned) earlier. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 14 -- fs/orangefs/orangefs-utils.c | 4 2 files changed, 8 insertions(+), 10 dele

[PATCH 14/18] orangefs: implement direct_IO for the read case

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg Since orangefs_file_read_iter now calls generic_file_read_iter, O_DIRECT now goes through direct_IO in the read case. In the write case, orangefs_file_write_iter never calls direct_IO, but handles the direct write manually. Signed-off-by: Martin Brandenburg --- fs

[PATCH 15/18] orangefs: call generic_file_read_iter

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg No need to manually implement this. The generic implementation handles direct IO as well. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs

[PATCH 11/18] orangefs: remove mapping_nrpages macro

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 4 +--- fs/orangefs/namei.c | 4 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index afb94ed7cef3..8dfa0e8c7326 100644 --- a/fs/orangefs/file.c

[PATCH 16/18] orangefs: implement write through the page cache

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg With this and the previous commit, OrangeFS is capable of writing through the page cache. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 132 +++- fs/orangefs/inode.c | 2 + fs/orangefs/super.c | 8

[PATCH 17/18] orangefs: no more explicit setattr

2017-12-12 Thread Martin Brandenburg
Now inodes will be marked dirty and written back at the appopriate time. Signed-off-by: Martin Brandenburg --- fs/orangefs/acl.c | 11 +++ fs/orangefs/inode.c | 17 - fs/orangefs/namei.c | 17 - fs/orangefs/orangefs

[PATCH 18/18] orangefs: implement xattr cache

2017-12-12 Thread Martin Brandenburg
=/orangefs/foo bs=256 count=32768; sync) 32768+0 records in 32768+0 records out 8388608 bytes (8.4 MB, 8.0 MiB) copied, 0.0438278 s, 191 MB/s real0m2.181s user0m0.002s sys 0m0.048s Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 1 + fs/orangefs/orangefs-kernel.h | 10

[PATCH 12/18] orangefs: set up and use backing_dev_info

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg This is a heavily modified revert of 70823b9bf3290855a7df895d89bd8209182b52e3. Signed-off-by: Martin Brandenburg --- fs/orangefs/super.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/fs/orangefs/super.c b/fs/orangefs

[PATCH 13/18] orangefs: inodes linger in cache

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg This is a big change, but it boils down to implementing write_inode, changing generic_delete_inode to generic_drop_inode, and changing set/getattr to set/get from the in-memory inode. The OrangeFS client requires a real getattr prior to any directory operations. Signed

[PATCH 02/18] orangefs: implement vm_ops->fault

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg Must retrieve size before running filemap_fault so the kernel has an up-to-date size. This should have been caught by xfstests generic/246, but it was masked by orangefs_new_inode, which set i_size to PAGE_SIZE. When nothing caused a getattr prior to a pagefault

[PATCH 09/18] orangefs: only set a_ops for regular files

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index 5c451e245cf7..cf6924c36a22 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c

[PATCH 00/18] orangefs: page cache

2017-12-12 Thread Martin Brandenburg
t was six months ago, but I'm still worried about how it will act when run for days, weeks, months at a time and across multiple machines. This is the next step in my testing. I'd appreciate any reviews, even if just to tell me that I've done everything completely wrong. Martin Br

[PATCH 03/18] orangefs: do not invalidate attributes on inode create

2017-12-12 Thread Martin Brandenburg
From: Martin Brandenburg When an inode is created, we fetch attributes from the server. There is no need to turn around and invalidate them. No need to initialize attributes after the getattr either. Either we'll do nothing or do something wrong. Signed-off-by: Martin Brandenburg --

[PATCH 2/5] orangefs: implement vm_ops->fault

2017-11-28 Thread Martin Brandenburg
. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 44879b1ff33e..c88846dc432a 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -531,6

[PATCH 0/5] orangefs: misc attribute fixes

2017-11-28 Thread Martin Brandenburg
de here is completely optimal. The others are supposed to improve performance but appear to be below the noise floor. Martin Brandenburg (5): orangefs: open code short single-use functions orangefs: implement vm_ops->fault orangefs: do not invalidate attributes on inode create orangefs: do n

[PATCH 3/5] orangefs: do not invalidate attributes on inode create

2017-11-28 Thread Martin Brandenburg
When an inode is created, we fetch attributes from the server. There is no need to turn around and invalidate them. No need to initialize attributes after the getattr either. Either we'll do nothing or do something wrong. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.

[PATCH 5/5] orangefs: reverse sense of revalidate is-inode-stale test

2017-11-28 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/dcache.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/orangefs/dcache.c b/fs/orangefs/dcache.c index ae782df5c063..c7aa5c923477 100644 --- a/fs/orangefs/dcache.c +++ b/fs/orangefs/dcache.c @@ -118,8

[PATCH 4/5] orangefs: do not invalidate attribute cache on setattr

2017-11-28 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-utils.c | 4 1 file changed, 4 deletions(-) diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c index 97fe93129f38..553b3ded51cd 100644 --- a/fs/orangefs/orangefs-utils.c +++ b/fs/orangefs/orangefs-utils.c

[PATCH 1/5] orangefs: open code short single-use functions

2017-11-28 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 95 +++--- 1 file changed, 19 insertions(+), 76 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 1668fd645c45..44879b1ff33e 100644 --- a/fs/orangefs/file.c +++ b/fs

[PATCH] orangefs: call op_release sooner when creating inodes

2017-11-10 Thread Martin Brandenburg
Prevents holding an unnecessary op while the kernel processes another op and yields the CPU. Signed-off-by: Martin Brandenburg --- fs/orangefs/namei.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c index

[PATCH] orangefs: stop setting atime on inode dirty

2017-11-07 Thread Martin Brandenburg
, the attribute change should be written out immediately. Fixes generic/120. In namei.c, there are several places where the directory mtime and ctime are set, but only the mtime is sent to the server. These don't seem right, but I've left them as is for now. Signed-off-by: Martin B

Re: [PATCH] orangefs: off by ones in xattr size checks

2017-05-22 Thread Martin Brandenburg
his is right. The OrangeFS userspace tools and the kernel both pass the zero byte. The server itself and our database is perfectly capable of handling any byte array. The value can be passed unchanged though (and you have left that). We still pass xfstests generic/020 with this applied. Revi

[PATCH] orangefs: free superblock when mount fails

2017-04-14 Thread Martin Brandenburg
c which deadlocks. Signed-off-by: Martin Brandenburg Cc: sta...@vger.kernel.org --- fs/orangefs/devorangefs-req.c | 9 +++-- fs/orangefs/orangefs-kernel.h | 1 + fs/orangefs/super.c | 23 --- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/fs/o

[PATCH 01/10] orangefs: remove unused get_fsid_from_ino

2017-04-07 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-kernel.h | 5 - 1 file changed, 5 deletions(-) diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h index 5e48a0b..24b0648 100644 --- a/fs/orangefs/orangefs-kernel.h +++ b/fs/orangefs/orangefs-kernel.h

[PATCH 03/10] orangefs: clean up oversize xattr validation

2017-04-07 Thread Martin Brandenburg
Also don't check flags as this has been validated by the VFS already. Fix an off-by-one error in the max size checking. Stop logging just because userspace wants to write attributes which do not fit. This and the previous commit fix xfstests generic/020. Signed-off-by: Martin Brande

[PATCH 04/10] orangefs: do not set getattr_time on orangefs_lookup

2017-04-07 Thread Martin Brandenburg
Since orangefs_lookup calls orangefs_iget which calls orangefs_inode_getattr, getattr_time will get set. Signed-off-by: Martin Brandenburg --- fs/orangefs/namei.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c index a290ff6..7c31593 100644 --- a

[PATCH 08/10] orangefs: remove ORANGEFS_READDIR macros

2017-04-07 Thread Martin Brandenburg
They are clones of the ORANGEFS_ITERATE macros in use elsewhere. Delete ORANGEFS_ITERATE_NEXT which is a hack previously used by readdir. Signed-off-by: Martin Brandenburg --- fs/orangefs/dir.c | 8 fs/orangefs/protocol.h | 9 ++--- 2 files changed, 6 insertions(+), 11

[PATCH 09/10] orangefs: implement statx

2017-04-07 Thread Martin Brandenburg
return them all. Fetching the size requires communicating with every I/O server (that the file is distributed across). Therefore if asked for anything except size, get everything except size, and if asked for size, get everything. Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c

[PATCH 06/10] orangefs: support llseek on directories

2017-04-07 Thread Martin Brandenburg
This and the previous commit fix xfstests generic/257. Signed-off-by: Martin Brandenburg --- fs/orangefs/dir.c | 48 ++-- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/fs/orangefs/dir.c b/fs/orangefs/dir.c index 3f82a73..c48220f

[PATCH 05/10] orangefs: rewrite readdir to fix several bugs

2017-04-07 Thread Martin Brandenburg
In the past, readdir assumed that the user buffer will be large enough that all entries from the server will fit. If this was not true, entries would be skipped. Since it works now, request 512 entries rather than 96 per server operation. Signed-off-by: Martin Brandenburg --- fs/orangefs

[PATCH 10/10] orangefs: do not check possibly stale size on truncate

2017-04-07 Thread Martin Brandenburg
ate did not happen if nothing had requested the size after the write in echo. Thus i_size was zero (not present) and the orangefs_setattr though i_size was zero and there was nothing to do. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 delet

[PATCH 07/10] orangefs: support very large directories

2017-04-07 Thread Martin Brandenburg
shorter than the maximum, the old code could usually handle several server requests before running out of space. Signed-off-by: Martin Brandenburg --- fs/orangefs/dir.c | 246 ++ 1 file changed, 172 insertions(+), 74 deletions(-) diff --git a/fs

[PATCH 02/10] orangefs: fix bounds check for listxattr

2017-04-07 Thread Martin Brandenburg
Signed-off-by: Martin Brandenburg --- fs/orangefs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/orangefs/xattr.c b/fs/orangefs/xattr.c index 74a81b1..fba4db7 100644 --- a/fs/orangefs/xattr.c +++ b/fs/orangefs/xattr.c @@ -358,7 +358,7 @@ ssize_t orangefs_listxattr

[PATCH 00/10] orangefs changes for 4.12

2017-04-07 Thread Martin Brandenburg
erformance to skip fetching size if it is not needed. I can't help but wonder if I've missed something. It passes xfstests, but I don't think it's been through all our internal tests. Then there are some miscellaneous fixes. Martin Brandenburg (10): orangefs: remove unuse

Re: [PATCH] orangefs: Axe some dead code

2016-11-22 Thread Martin Brandenburg
er. That's exactly what this is. Reviewed-by: Martin Brandenburg > > Signed-off-by: Christophe JAILLET > --- > fs/orangefs/orangefs-sysfs.c | 9 - > 1 file changed, 9 deletions(-) > > diff --git a/fs/orangefs/orangefs-sysfs.c b/fs/orangefs/orangefs-sy

Re: [GIT PULL] orangefs: kernel side caching and executable bugfix

2016-08-02 Thread Martin Brandenburg
atch, size is always collected to be inserted into the cache. Thus the bug disappears. If this patch is not accepted during this merge window, we will send a one-line band-aid for this bug instead. -------- Martin Brandenburg (5): orangefs:

[GIT PULL] orangefs: kernel side caching and executable bugfix

2016-08-01 Thread Martin Brandenburg
. Martin Brandenburg (5): orangefs: Use d_time to avoid excessive lookups orangefs: Cache getattr results. orangefs: Allow dcache and getattr cache time to be configured. orangefs: Change default dcache and getattr timeout to 50 msec. orangefs: Account for jiffies

[PATCH] orangefs: strncpy -> strscpy

2016-04-08 Thread Martin Brandenburg
= NAME_MAX + 1; there is always enough space for a name plus a NUL byte. Signed-off-by: Martin Brandenburg --- fs/orangefs/orangefs-utils.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c index 40f5163..f392a6a

[PATCH 1/3] orangefs: clean up truncate ctime and mtime setting

2016-04-04 Thread Martin Brandenburg
From: Martin Brandenburg The ctime and mtime are always updated on a successful ftruncate and only updated on a successful truncate where the size changed. We handle the ``if the size changed'' bit. This matches FUSE's behavior. Signed-off-by: Martin Brandenburg --- fs/orange

[PATCH 2/3] orangefs: strncpy -> strlcpy

2016-04-04 Thread Martin Brandenburg
From: Martin Brandenburg Almost everywhere we use strncpy we should use strlcpy. This affects path names (d_name mostly), symlink targets, and server names. Leave debugfs code as is for now, though it could use a review as well. Signed-off-by: Martin Brandenburg --- fs/orangefs/dcache.c

[PATCH 3/3] orangefs: remove unused variable

2016-04-04 Thread Martin Brandenburg
From: Martin Brandenburg --- fs/orangefs/dir.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/orangefs/dir.c b/fs/orangefs/dir.c index ba7dec4..324f0af 100644 --- a/fs/orangefs/dir.c +++ b/fs/orangefs/dir.c @@ -153,7 +153,6 @@ static int orangefs_readdir(struct file

Re: [git pull] orangefs bugfixes for rc2

2016-04-01 Thread Martin Brandenburg
On Fri, 1 Apr 2016, Joe Perches wrote: > Hello Martin. > > Here's an orangefs patch I think should be applied: > https://patchwork.kernel.org/patch/8676461/ > > You were not cc'd on this as you are not listed as a > maintainer for orangefs. > > Should you be? > > Mike is listed AFAIK. He's

Re: [git pull] orangefs bugfixes for rc2

2016-04-01 Thread Martin Brandenburg
rsion. Martin Brandenburg (2): orangefs: don't put readdir slot twice orangefs: minimum userspace version is 2.9.3 fs/orangefs/dir.c | 8 +++- fs/orangefs/protocol.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-)

  1   2   >