Skip to content

cifs: clean up management of open filehandles

Jeff Layton linux-cifs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14cifs: keep dentry reference in cifsFileInfo instead of inode referencefs/cifs/cifsglob.h fs/cifs/dir.c fs/cifs/file.c +1 more+6 -50 replies
2/14cifs: don't use vfsmount to pin superblock for oplock breaksfs/cifs/cifs_fs_sb.h fs/cifs/cifsfs.c fs/cifs/cifsfs.h +4 more+29 -180 replies
3/14cifs: eliminate cifs_posix_open_inode_helperfs/cifs/file.c+0 -670 replies
4/14cifs: eliminate oflags option from cifs_new_fileinfofs/cifs/cifsproto.h fs/cifs/dir.c fs/cifs/file.c+7 -100 replies
5/14cifs: eliminate the inode argument from cifs_new_fileinfofs/cifs/cifsproto.h fs/cifs/dir.c fs/cifs/file.c+24 -270 replies
6/14cifs: clean up cifs_reopen_filefs/cifs/cifsglob.h fs/cifs/dir.c fs/cifs/file.c+57 -730 replies
7/14cifs: cifs_write argument change and cleanupfs/cifs/file.c+17 -340 replies
8/14cifs: eliminate pfile pointer from cifsFileInfofs/cifs/cifsglob.h fs/cifs/dir.c fs/cifs/file.c+3 -100 replies
9/14cifs: move cifs_new_fileinfo to file.cfs/cifs/dir.c fs/cifs/file.c+48 -500 replies
10/14cifs: convert GlobalSMBSeslock from a rwlock to regular spinlockfs/cifs/cifsfs.c fs/cifs/cifsglob.h fs/cifs/cifssmb.c +3 more+38 -382 replies
11/14cifs: move cifsFileInfo_put to file.cfs/cifs/cifsglob.h fs/cifs/file.c+11 -90 replies
12/14cifs: move close processing from cifs_close to cifsFileInfo_putfs/cifs/cifsglob.h fs/cifs/file.c fs/cifs/misc.c+62 -1380 replies
13/14cifs: wait for writeback to complete in cifs_flushfs/cifs/file.c+1 -100 replies
14/14cifs: eliminate cifsInodeInfo->write_behind_rcfs/cifs/cifsfs.c fs/cifs/cifsglob.h fs/cifs/file.c +1 more+12 -360 replies

Reviews trailers per patch

None of the 14 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSuresh Jayaraman
SeriesR-b
1/14
2/14
3/14
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/14] cifs: clean up management of open filehandles

This patchset fixes a number of problems with the existing CIFS code. It eliminates the backreference to the filp from cifsFileInfo, allowing a cifsFileInfo to outlive the filp that it was generated against.

With that change, most of the closing of a filehandle on the server is moved to cifsFileInfo_put. cifs_close is then changed to just put the filehandle instead of trying to wait around for existing users to finish with it.

With this change, there is some further cleanup that can be done as well. For instance, there's no real need to continually search for new filehandles in cifs_writepages now that we hold a reference to one. I'll hold back on that until I know how this set has been received.

This set is an ordered set and should not be committed out of order. It should be bisectable. I've tested the resulting set and it seems to work fine.

Jeff Layton (14):
cifs: keep dentry reference in cifsFileInfo instead of inode
reference
cifs: don't use vfsmount to pin superblock for oplock breaks
cifs: eliminate cifs_posix_open_inode_helper
cifs: eliminate oflags option from cifs_new_fileinfo
cifs: eliminate the inode argument from cifs_new_fileinfo
cifs: clean up cifs_reopen_file
cifs: cifs_write argument change and cleanup
cifs: eliminate pfile pointer from cifsFileInfo
cifs: move cifs_new_fileinfo to file.c
cifs: convert GlobalSMBSeslock from a rwlock to regular spinlock
cifs: move cifsFileInfo_put to file.c
cifs: move close processing from cifs_close to cifsFileInfo_put
cifs: wait for writeback to complete in cifs_flush
cifs: eliminate cifsInodeInfo->write_behind_rc

 fs/cifs/cifs_fs_sb.h |    1 +
 fs/cifs/cifsfs.c     |   21 ++-
 fs/cifs/cifsfs.h     |    6 +-
 fs/cifs/cifsglob.h   |   19 +--
 fs/cifs/cifsproto.h  |    6 +-
 fs/cifs/cifssmb.c    |    4 +-
 fs/cifs/dir.c        |   60 +-----
 fs/cifs/file.c       |  574 +++++++++++++++++++-------------------------------
 fs/cifs/inode.c      |   15 +-
 fs/cifs/misc.c       |   18 +--
 fs/cifs/readdir.c    |    6 +-
 11 files changed, 260 insertions(+), 470 deletions(-)
Signature · 1 line
1.7.2.3