aboutsummaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)AuthorFilesLines
2012-09-24CIFS: Add set_file_info support for SMB2Pavel Shilovsky4-0/+39
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move set_file_info to ops structPavel Shilovsky3-73/+88
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Add SMB2 support for set_file_sizePavel Shilovsky6-3/+60
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move set_file_size to ops structPavel Shilovsky5-75/+89
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Add SMB2 support for hardlink operationPavel Shilovsky6-6/+76
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move hardlink to ops structSteve French5-44/+63
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Add SMB2 support for rename operationPavel Shilovsky5-0/+167
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move rename to ops structPavel Shilovsky5-57/+66
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Enable signing in SMB2Pavel Shilovsky9-28/+253
Use hmac-sha256 and rather than hmac-md5 that is used for CIFS/SMB. Signature field in SMB2 header is 16 bytes instead of 8 bytes. Automatically enable signing by client when requested by the server when signing ability is available to the client. Signed-off-by: Shirish Pargaonkar <[email protected]> Signed-off-by: Sachin Prabhu <[email protected]> Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Add writepage support for SMB2Pavel Shilovsky3-0/+75
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move writepage to ops structPavel Shilovsky5-22/+38
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Add readpage support for SMB2Pavel Shilovsky3-0/+65
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move readpage code to ops structPavel Shilovsky3-11/+32
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Add SMB2 support for cifs_iovec_writePavel Shilovsky8-44/+206
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move async write to ops structPavel Shilovsky4-3/+18
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Add SMB2 support for cifs_iovec_readPavel Shilovsky10-20/+225
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move async read to ops structPavel Shilovsky4-2/+13
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Add SMB2 r/wsize negotiatingPavel Shilovsky1-0/+45
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move r/wsize negotiating to ops structPavel Shilovsky3-142/+149
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Add SMB2 support for flushPavel Shilovsky4-0/+63
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Make flush code use ops structPavel Shilovsky3-4/+26
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move reopen code to ops structPavel Shilovsky1-57/+64
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move create code use ops structPavel Shilovsky3-49/+58
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Add SMB2 support for query_file_infoPavel Shilovsky1-0/+21
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move guery file info code to ops structPavel Shilovsky4-5/+20
and make cifs_get_file_info(_unix) calls static. Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Add open/close file support for SMB2Pavel Shilovsky8-17/+172
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move close code to ops structPavel Shilovsky3-3/+17
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move open code to ops structPavel Shilovsky5-44/+79
Acked-by: Jeff Layton <[email protected]> Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Replace netfid with cifs_fid struct in cifsFileInfoPavel Shilovsky9-78/+87
This is help us to extend the code for future protocols that can use another fid mechanism (as SMB2 that has it divided into two parts: persistent and violatile). Also rename variables and refactor the code around the changes. Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Add SMB2 support for unlinkPavel Shilovsky3-0/+12
Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24CIFS: Move unlink code to ops structPavel Shilovsky5-22/+44
Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2012-09-24GFS2: Write out dirty inode metadata in delayed deletesBenjamin Marzinski1-0/+5
If a dirty GFS2 inode was being deleted but was in use by another node, its metadata was not getting written out before GFS2 checked for dirty buffers in gfs2_ail_flush(). GFS2 was relying on inode_go_sync() to write out the metadata when the other node tried to free the file, but it failed the error check before it got that far. This patch writes out the metadata before calling gfs2_ail_flush() Signed-off-by: Benjamin Marzinski <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: fix s_writers.counter imbalance in gfs2_ail_empty_glEric Sandeen1-0/+1
gfs2_ail_empty_gl() contains an "inline version" of gfs2_trans_begin(), so it needs an explicit sb_start_intwrite() as well, to balance the sb_end_intwrite() which will be called by gfs2_trans_end(). With this, xfstest 068 passes on lock_nolock local gfs2. Without it, we reach a writer count of -1 and get stuck. Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: Fix infinite loop in rbm_findBob Peterson1-0/+1
This patch fixes an infinite loop in gfs2_rbm_find that was introduced by the previous patch. The problem occurred when the length was less than 3 but the rbm block was byte-aligned, causing it to improperly return a extent length of zero, which caused it to spin. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]> Tested-by: Bob Peterson <[email protected]> Tested-by: Barry Marson <[email protected]>
2012-09-24GFS2: Consolidate free block searching functionsSteven Whitehouse4-190/+195
With the recently added block reservation code, an additional function was added to search for free blocks. This had a restriction of only being able to search for aligned extents of free blocks. As a result the allocation patterns when reserving blocks were suboptimal when the existing allocation of blocks for an inode was not aligned to the same boundary. This patch resolves that problem by adding the ability for gfs2_rbm_find to search for extents of a particular minimum size. We can then use gfs2_rbm_find for both looking for reservations, and also looking for free blocks on an individual basis when we actually come to do the allocation later on. As a result we only need a single set of code to deal with both situations. The function gfs2_rbm_from_block() is moved up rgrp.c so that it occurs before all of its callers. Many thanks are due to Bob for helping track down the final issue in this patch. That fix to the rb_tree traversal and to not share block reservations from a dirctory to its children is included here. Signed-off-by: Steven Whitehouse <[email protected]> Signed-off-by: Bob Peterson <[email protected]>
2012-09-24GFS2: Get rid of I_MUTEX_QUOTA usageJan Kara2-1/+9
GFS2 uses i_mutex on its system quota inode to synchronize writes to quota file. Since this is an internal inode to GFS2 (not part of directory hiearchy or visible by user) we are safe to define locking rules for it. So let's just get it its own locking class to make it clear. Signed-off-by: Jan Kara <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: Stop block extents at the end of bitmapsBob Peterson1-2/+1
This patch stops multiple block allocations if a nonzero return code is received from gfs2_rbm_from_block. Without this patch, if enough pressure is put on the file system, you get a kernel warning quickly followed by: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffffa04f47e8>] gfs2_alloc_blocks+0x2c8/0x880 [gfs2] With this patch, things run normally. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: Fix unclaimed_blocks() wrapping bug and clean upSteven Whitehouse1-105/+88
When rgd->rd_free_clone is less than rgd->rd_reserved, the unclaimed_blocks() calculation would wrap and produce incorrect results. This patch checks for this condition when this function is called from gfs2_mblk_search() In addition, the use of this particular function in other places in the code has been dropped by means of a general clean up of gfs2_inplace_reserve(). This function is now much easier to follow. Also the setting of the rgd->rd_last_alloc field is corrected. Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: Improve block reservation tracingSteven Whitehouse3-26/+20
This patch improves the tracing of block reservations by removing some corner cases and also providing more useful detail in the traces. A new field is added to the reservation structure to contain the inode number. This is used since in certain contexts it is not possible to access the inode itself to obtain this information. As a result we can then display the inode number for all tracepoints and also in case we dump the resource group. The "del" tracepoint operation has been removed. This could be called with the reservation rgrp set to NULL. That resulted in not printing the device number, and thus making the information largely useless anyway. Also, the conditional on the rgrp being NULL can then be removed from the tracepoint. After this change, all the block reservation tracepoint calls will be called with the rgrp information. The existing ins,clm and tdel calls to the block reservation tracepoint are sufficient to track the entire life of the block reservation. In gfs2_block_alloc() the error detection is updated to print out the inode number of the problematic inode. This can then be compared against the information in the glock dump,tracepoints, etc. Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: Fall back to ignoring reservations, if there are no other blocks leftSteven Whitehouse1-0/+5
When we get to the stage of allocating blocks, we know that the resource group in question must contain enough free blocks, otherwise gfs2_inplace_reserve() would have failed. So if we are left with only free blocks which are reserved, then we must use those. This can happen if another node has sneeked in and use some blocks reserved on this node, for example. Generally this will happen very rarely and only when the resouce group is nearly full. Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: Fix ->show_options() for statfs slowSteven Whitehouse1-0/+2
The ->show_options() function for GFS2 was not correctly displaying the value when statfs slow in in use. Signed-off-by: Steven Whitehouse <[email protected]> Reported-by: Milos Jakubicek <[email protected]>
2012-09-24GFS2: Use rbm for gfs2_setbit()Steven Whitehouse1-26/+20
Use the rbm structure for gfs2_setbit() in order to simplify the arguments to the function. We have to add a bool to control whether the clone bitmap should be updated (if it exists) but otherwise it is a more or less direct substitution. Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: Use rbm for gfs2_testbit()Steven Whitehouse1-44/+28
Change the arguments to gfs2_testbit() so that it now just takes an rbm specifying the position of the two bit entry to return. Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: Eliminate unnecessary check for state > 3 in bitfitBob Peterson1-2/+0
Function gfs2_bitfit was checking for state > 3, but that's impossible since it is only called from rgblk_search, which receives only GFS2_BLKST_ constants. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: Eliminate redundant calls to may_grantBob Peterson1-5/+4
Function add_to_queue was checking may_grant for the passed-in holder for every iteration of its gh2 loop. Now it only checks it once at the beginning to see if a try lock is futile. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: Combine functions gfs2_glock_dq_wait and wait_on_demoteBob Peterson1-7/+2
Function gfs2_glock_dq_wait called two-line function wait_on_demote, so they were combined. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: Combine functions gfs2_glock_wait and wait_on_holderBob Peterson1-14/+9
Function gfs2_glock_wait only called function wait_on_holder and returned its return code, so they were combined for readability. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: inline __gfs2_glock_schedule_for_reclaimBob Peterson1-16/+3
Since function gfs2_glock_schedule_for_reclaim is only two significant lines, we can eliminate it, simplifying the code and making it more readable. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: change function gfs2_direct_IO to use a normal gfs2_glock_dqBob Peterson1-1/+1
This patch changes function gfs2_direct_IO so that it uses a normal call to gfs2_glock_dq rather than a call to a multiple-dq of one item. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2012-09-24GFS2: rbm code cleanupBob Peterson1-5/+11
This patch fixes a few small rbm related things. First, it fixes a corner case where the rbm needs to switch bitmaps and wasn't adjusting its buffer pointer. Second, there's a white space issue fixed. Third, the logic in function gfs2_rbm_from_block was optimized a bit. Lastly, a check for goal block overflows was added to function gfs2_alloc_blocks. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>