30 May, 2012

1 commit

  • Pull CIFS updates from Steve French.

    * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: (29 commits)
    cifs: fix oops while traversing open file list (try #4)
    cifs: Fix comment as d_alloc_root() is replaced by d_make_root()
    CIFS: Introduce SMB2 mounts as vers=2.1
    CIFS: Introduce SMB2 Kconfig option
    CIFS: Move add/set_credits and get_credits_field to ops structure
    CIFS: Move protocol specific demultiplex thread calls to ops struct
    CIFS: Move protocol specific part from cifs_readv_receive to ops struct
    CIFS: Move header_size/max_header_size to ops structure
    CIFS: Move protocol specific part from SendReceive2 to ops struct
    cifs: Include backup intent search flags during searches {try #2)
    CIFS: Separate protocol specific part from setlk
    CIFS: Separate protocol specific part from getlk
    CIFS: Separate protocol specific lock type handling
    CIFS: Convert lock type to 32 bit variable
    CIFS: Move locks to cifsFileInfo structure
    cifs: convert send_nt_cancel into a version specific op
    cifs: add a smb_version_operations/values structures and a smb_version enum
    cifs: remove the vers= and version= synonyms for ver=
    cifs: add warning about change in default cache semantics in 3.7
    cifs: display cache= option in /proc/mounts
    ...

    Linus Torvalds
     

29 May, 2012

1 commit

  • Pull writeback tree from Wu Fengguang:
    "Mainly from Jan Kara to avoid iput() in the flusher threads."

    * tag 'writeback' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
    writeback: Avoid iput() from flusher thread
    vfs: Rename end_writeback() to clear_inode()
    vfs: Move waiting for inode writeback from end_writeback() to evict_inode()
    writeback: Refactor writeback_single_inode()
    writeback: Remove wb->list_lock from writeback_single_inode()
    writeback: Separate inode requeueing after writeback
    writeback: Move I_DIRTY_PAGES handling
    writeback: Move requeueing when I_SYNC set to writeback_sb_inodes()
    writeback: Move clearing of I_SYNC into inode_sync_complete()
    writeback: initialize global_dirty_limit
    fs: remove 8 bytes of padding from struct writeback_control on 64 bit builds
    mm: page-writeback.c: local functions should not be exposed globally

    Linus Torvalds
     

23 May, 2012

9 commits

  • While traversing the linked list of open file handles, if the identfied
    file handle is invalid, a reopen is attempted and if it fails, we
    resume traversing where we stopped and cifs can oops while accessing
    invalid next element, for list might have changed.

    So mark the invalid file handle and attempt reopen if no
    valid file handle is found in rest of the list.
    If reopen fails, move the invalid file handle to the end of the list
    and start traversing the list again from the begining.
    Repeat this four times before giving up and returning an error if
    file reopen keeps failing.

    Cc:
    Signed-off-by: Shirish Pargaonkar
    Reviewed-by: Jeff Layton
    Signed-off-by: Steve French

    Shirish Pargaonkar
     
  • For more details see .

    Signed-off-by: Sedat Dilek
    Signed-off-by: Steve French

    Sedat Dilek
     
  • As with Linux nfs client, which uses "nfsvers=" or "vers=" to
    indicate which protocol to use for mount, specifying

    "vers=2.1"

    will force an SMB2 mount. When vers is not specified CIFS is used

    "vers=1"

    We can eventually autonegotiate down from SMB2 to CIFS
    when SMB2 is stable enough to make it the default, but this
    is for the future. At that time we could also implement a
    "maxprotocol" mount option as smbclient and Samba have today,
    but that would be premature until SMB2 is stable.

    Intially the SMB2 Kconfig option will depend on "BROKEN"
    until the merge is complete, and then be "EXPERIMENTAL"
    When it is no longer experimental we can consider changing
    the default protocol to attempt first.

    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Jeff Layton
    Acked-by: Shirish Pargaonkar
    Signed-off-by: Steve French

    Steve French
     
  • SMB2 is the followon to the CIFS (and SMB) protocols
    and the default for Windows since Windows Vista, and also
    now implemented by various non-Windows servers. SMB2
    is more secure, has various performance advantages, including
    larger i/o sizes, flow control, better caching model and more.
    SMB2 also resolves some scalability limits in the CIFS
    protocol and adds many new features while being much
    simpler (only a few dozen commands instead of hundreds)
    and since the protocol is clearer it is also more consistently
    implemented across servers and thus easier to optimize.

    After much discussion with Jeff Layton, Jeremy Allison
    and others at Connectathon, we decided to move the SMB2
    code from a distinct .ko and fstype into distinct
    C files that optionally build in cifs.ko. As a result
    the Kconfig gets simpler.

    To avoid destabilizing CIFS, the SMB2 code is going
    to be moved into its own experimental CONFIG_CIFS_SMB2 ifdef
    as it is merged and rereviewed. The changes to stable
    CIFS (builds with the SMB2 ifdef off) are expected to be
    fairly small.

    Reviewed-by: Jeff Layton
    Signed-off-by: Steve French
    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Steve French

    Steve French
     
  • Acked-by: Shirish Pargaonkar
    Reviewed-by: Jeff Layton
    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Steve French

    Pavel Shilovsky
     
  • Acked-by: Shirish Pargaonkar
    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Steve French

    Pavel Shilovsky
     
  • Acked-by: Shirish Pargaonkar
    Reviewed-by: Jeff Layton
    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Steve French

    Pavel Shilovsky
     
  • Acked-by: Shirish Pargaonkar
    Reviewed-by: Jeff Layton
    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Steve French

    Pavel Shilovsky
     
  • Acked-by: Shirish Pargaonkar
    Reviewed-by: Jeff Layton
    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Steve French

    Pavel Shilovsky
     

17 May, 2012

21 commits


10 May, 2012

1 commit


06 May, 2012

1 commit

  • After we moved inode_sync_wait() from end_writeback() it doesn't make sense
    to call the function end_writeback() anymore. Rename it to clear_inode()
    which well says what the function really does - set I_CLEAR flag.

    Signed-off-by: Jan Kara
    Signed-off-by: Fengguang Wu

    Jan Kara
     

04 May, 2012

4 commits

  • The problem was that the first referral was parsed more than once
    and so the caller tried the same referrals multiple times.

    The problem was introduced partly by commit
    066ce6899484d9026acd6ba3a8dbbedb33d7ae1b,
    where 'ref += le16_to_cpu(ref->Size);' got lost,
    but that was also wrong...

    Cc:
    Signed-off-by: Stefan Metzmacher
    Tested-by: Björn Jacke
    Reviewed-by: Jeff Layton
    Signed-off-by: Steve French

    Stefan Metzmacher
     
  • Older mount.cifs programs passed this on to the kernel after parsing
    the file. Make sure the kernel ignores that option.

    Should fix:

    https://bugzilla.kernel.org/show_bug.cgi?id=43195

    Cc: Sachin Prabhu
    Reported-by: Ronald
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • Signed-off-by: Steve French

    Steve French
     
  • When revalidating a dentry, if the inode wasn't known to be a dfs
    entry when the dentry was instantiated, such as when created via
    ->readdir(), the DCACHE_NEED_AUTOMOUNT flag needs to be set on the
    dentry in ->d_revalidate().

    The false return from cifs_d_revalidate(), due to the inode now
    being marked with the S_AUTOMOUNT flag, might not invalidate the
    dentry if there is a concurrent unlazy path walk. This is because
    the dentry reference count will be at least 2 in this case causing
    d_invalidate() to return EBUSY. So the asumption that the dentry
    will be discarded then correctly instantiated via ->lookup() might
    not hold.

    Signed-off-by: Ian Kent
    Reviewed-by: Jeff Layton
    Cc: Steve French
    Cc: linux-cifs@vger.kernel.org
    Signed-off-by: Steve French

    Ian Kent
     

02 May, 2012

2 commits

  • Cc: Pavel Shilovsky
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • While testing, I've found that even when we are able to negotiate a
    much larger rsize with the server, on-the-wire reads often end up being
    capped at 128k because of ra_pages being capped at that level.

    Lifting this restriction gave almost a twofold increase in sequential
    read performance on my craptactular KVM test rig with a 1M rsize.

    I think this is safe since the actual ra_pages that the VM requests
    is run through max_sane_readahead() prior to submitting the I/O. Under
    memory pressure we should end up with large readahead requests being
    suppressed anyway.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton