1. 23 5月, 2014 1 次提交
  2. 07 3月, 2014 1 次提交
    • T
      afs: don't use PREPARE_WORK · 05949945
      Tejun Heo 提交于
      PREPARE_[DELAYED_]WORK() are being phased out.  They have few users
      and a nasty surprise in terms of reentrancy guarantee as workqueue
      considers work items to be different if they don't have the same work
      function.
      
      afs_call->async_work is multiplexed with multiple work functions.
      Introduce afs_async_workfn() which invokes afs_call->async_workfn and
      always use it as the work function and update the users to set the
      ->async_workfn field instead of overriding the work function using
      PREPARE_WORK().
      
      It would probably be best to route this with other related updates
      through the workqueue tree.
      
      Compile tested.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: linux-afs@lists.infradead.org
      05949945
  3. 25 1月, 2014 1 次提交
  4. 17 3月, 2012 1 次提交
    • A
      afs: Read of file returns EBADMSG · 2c724fb9
      Anton Blanchard 提交于
      A read of a large file on an afs mount failed:
      
      # cat junk.file > /dev/null
      cat: junk.file: Bad message
      
      Looking at the trace, call->offset wrapped since it is only an
      unsigned short. In afs_extract_data:
      
              _enter("{%u},{%zu},%d,,%zu", call->offset, len, last, count);
      ...
      
              if (call->offset < count) {
                      if (last) {
                              _leave(" = -EBADMSG [%d < %zu]", call->offset, count);
                              return -EBADMSG;
                      }
      
      Which matches the trace:
      
      [cat   ] ==> afs_extract_data({65132},{524},1,,65536)
      [cat   ] <== afs_extract_data() = -EBADMSG [0 < 65536]
      
      call->offset went from 65132 to 0. Fix this by making call->offset an
      unsigned int.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2c724fb9
  5. 21 7月, 2011 1 次提交
    • J
      fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers · 02c24a82
      Josef Bacik 提交于
      Btrfs needs to be able to control how filemap_write_and_wait_range() is called
      in fsync to make it less of a painful operation, so push down taking i_mutex and
      the calling of filemap_write_and_wait() down into the ->fsync() handlers.  Some
      file systems can drop taking the i_mutex altogether it seems, like ext3 and
      ocfs2.  For correctness sake I just pushed everything down in all cases to make
      sure that we keep the current behavior the same for everybody, and then each
      individual fs maintainer can make up their mind about what to do from there.
      Thanks,
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      02c24a82
  6. 20 7月, 2011 1 次提交
  7. 16 1月, 2011 1 次提交
  8. 15 1月, 2011 1 次提交
  9. 13 1月, 2011 1 次提交
  10. 07 1月, 2011 1 次提交
  11. 13 8月, 2010 1 次提交
  12. 12 8月, 2010 1 次提交
    • W
      AFS: Implement an autocell mount capability [ver #2] · bec5eb61
      wanglei 提交于
      Implement the ability for the root directory of a mounted AFS filesystem to
      accept lookups of arbitrary directory names, to interpet the names as the names
      of cells, to look the cell names up in the DNS for AFSDB records and to mount
      the root.cell volume of the nominated cell on the pseudo-directory created by
      lookup.
      
      This facility is requested by passing:
      
      	-o autocell
      
      to the mountpoint for which this is desired, usually the /afs mount.
      
      To use this facility, a DNS upcall program is required for AFSDB records.  This
      can be obtained from:
      
      	http://people.redhat.com/~dhowells/afs/dns.afsdb.c
      
      It should be compiled with -lresolv and -lkeyutils and installed as, say:
      
      	/usr/sbin/dns.afsdb
      
      Then the following line needs to be added to /sbin/request-key.conf:
      
      	create	dns_resolver afsdb:*	*	/usr/sbin/dns.afsdb %k
      
      This can be tested by mounting AFS, say:
      
      	insmod dns_resolver.ko
      	insmod af-rxrpc.ko
      	insmod kafs.ko rootcell=grand.central.org
      	mount -t afs "#grand.central.org:root.cell." /afs -o autocell
      
      and doing:
      
      	ls /afs/grand.central.org/
      
      which should show:
      
      	archive/  cvs/  doc/  local/  project/  service/  software/  user/  www/
      
      if it works.
      Signed-off-by: NWang Lei <wang840925@gmail.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      bec5eb61
  13. 10 8月, 2010 1 次提交
  14. 28 5月, 2010 1 次提交
  15. 22 5月, 2010 1 次提交
    • A
      AFS: Don't put struct file on the stack · f6d335c0
      Al Viro 提交于
      Don't put struct file on the stack as it takes up quite a lot of space
      and violates lifetime rules for struct file.
      
      Rather than calling afs_readpage() indirectly from the directory routines by
      way of read_mapping_page(), split afs_readpage() to have afs_page_filler()
      that's given a key instead of a file and call read_cache_page(), specifying the
      new function directly.  Use it in afs_readpages() as well.
      
      Also make use of this in afs_mntpt_check_symlink() too for the same reason.
      Reported-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      f6d335c0
  16. 22 4月, 2010 1 次提交
  17. 06 3月, 2010 1 次提交
    • C
      make sure data is on disk before calling ->write_inode · 26821ed4
      Christoph Hellwig 提交于
      Similar to the fsync issue fixed a while ago in commit
      2daea67e we need to write for data to
      actually hit the disk before writing out the metadata to guarantee
      data integrity for filesystems that modify the inode in the data I/O
      completion path.  Currently XFS and NFS handle this manually, and AFS
      has a write_inode method that does nothing but waiting for data, while
      others are possibly missing out on this.
      
      Fortunately this change has a lot less impact than the fsync change
      as none of the write_inode methods starts data writeout of any form
      by itself.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      26821ed4
  18. 02 10月, 2009 1 次提交
  19. 03 4月, 2009 1 次提交
  20. 17 10月, 2008 1 次提交
  21. 27 7月, 2008 1 次提交
    • A
      [PATCH] sanitize ->permission() prototype · e6305c43
      Al Viro 提交于
      * kill nameidata * argument; map the 3 bits in ->flags anybody cares
        about to new MAY_... ones and pass with the mask.
      * kill redundant gfs2_iop_permission()
      * sanitize ecryptfs_permission()
      * fix remaining places where ->permission() instances might barf on new
        MAY_... found in mask.
      
      The obvious next target in that direction is permission(9)
      
      folded fix for nfs_permission() breakage from Miklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      e6305c43
  22. 30 4月, 2008 1 次提交
  23. 04 4月, 2008 1 次提交
  24. 28 3月, 2008 1 次提交
  25. 17 10月, 2007 1 次提交
    • A
      fs/afs/: possible cleanups · c1206a2c
      Adrian Bunk 提交于
      This patch contains the following possible cleanups:
      - make the following needlessly global functions static:
        - rxrpc.c: afs_send_pages()
        - vlocation.c: afs_vlocation_queue_for_updates()
        - write.c: afs_writepages_region()
      - make the following needlessly global variables static:
        - mntpt.c: afs_mntpt_expiry_timeout
        - proc.c: afs_vlocation_states[]
        - server.c: afs_server_timeout
        - vlocation.c: afs_vlocation_timeout
        - vlocation.c: afs_vlocation_update_timeout
      - #if 0 the following unused function:
        - cell.c: afs_get_cell_maybe()
      - #if 0 the following unused variables:
        - callback.c: afs_vnode_update_timeout
        - cmservice.c: struct afs_cm_workqueue
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c1206a2c
  26. 17 7月, 2007 1 次提交
  27. 31 5月, 2007 1 次提交
    • A
      afs: needs sched.h · 00c541ea
      Andrew Morton 提交于
      mips:
      
      fs/afs/flock.c: In function `afs_lock_may_be_available':
      fs/afs/flock.c:55: error: dereferencing pointer to incomplete type
      fs/afs/flock.c: In function `afs_lock_work':
      fs/afs/flock.c:84: error: dereferencing pointer to incomplete type
      fs/afs/flock.c:89: error: dereferencing pointer to incomplete type
      fs/afs/flock.c:109: error: dereferencing pointer to incomplete type
      fs/afs/flock.c:135: error: dereferencing pointer to incomplete type
      fs/afs/flock.c:143: error: dereferencing pointer to incomplete type
      fs/afs/flock.c:158: error: dereferencing pointer to incomplete type
      fs/afs/flock.c:161: error: dereferencing pointer to incomplete type
      fs/afs/flock.c:179: error: `TASK_UNINTERRUPTIBLE' undeclared (first use in this function)
      fs/afs/flock.c:179: error: (Each undeclared identifier is reported only once
      fs/afs/flock.c:179: error: for each function it appears in.)
      fs/afs/flock.c:179: error: `TASK_INTERRUPTIBLE' undeclared (first use in this function)
      fs/afs/flock.c:182: error: dereferencing pointer to incomplete type
      
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      00c541ea
  28. 22 5月, 2007 1 次提交
    • A
      Detach sched.h from mm.h · e8edc6e0
      Alexey Dobriyan 提交于
      First thing mm.h does is including sched.h solely for can_do_mlock() inline
      function which has "current" dereference inside. By dealing with can_do_mlock()
      mm.h can be detached from sched.h which is good. See below, why.
      
      This patch
      a) removes unconditional inclusion of sched.h from mm.h
      b) makes can_do_mlock() normal function in mm/mlock.c
      c) exports can_do_mlock() to not break compilation
      d) adds sched.h inclusions back to files that were getting it indirectly.
      e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
         getting them indirectly
      
      Net result is:
      a) mm.h users would get less code to open, read, preprocess, parse, ... if
         they don't need sched.h
      b) sched.h stops being dependency for significant number of files:
         on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
         after patch it's only 3744 (-8.3%).
      
      Cross-compile tested on
      
      	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
      	alpha alpha-up
      	arm
      	i386 i386-up i386-defconfig i386-allnoconfig
      	ia64 ia64-up
      	m68k
      	mips
      	parisc parisc-up
      	powerpc powerpc-up
      	s390 s390-up
      	sparc sparc-up
      	sparc64 sparc64-up
      	um-x86_64
      	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8edc6e0
  29. 11 5月, 2007 1 次提交
  30. 10 5月, 2007 2 次提交
    • D
      AFS: implement basic file write support · 31143d5d
      David Howells 提交于
      Implement support for writing to regular AFS files, including:
      
       (1) write
      
       (2) truncate
      
       (3) fsync, fdatasync
      
       (4) chmod, chown, chgrp, utime.
      
      AFS writeback attempts to batch writes into as chunks as large as it can manage
      up to the point that it writes back 65535 pages in one chunk or it meets a
      locked page.
      
      Furthermore, if a page has been written to using a particular key, then should
      another write to that page use some other key, the first write will be flushed
      before the second is allowed to take place.  If the first write fails due to a
      security error, then the page will be scrapped and reread before the second
      write takes place.
      
      If a page is dirty and the callback on it is broken by the server, then the
      dirty data is not discarded (same behaviour as NFS).
      
      Shared-writable mappings are not supported by this patch.
      
      [akpm@linux-foundation.org: fix a bunch of warnings]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      31143d5d
    • D
      AFS: AFS fixups · 416351f2
      David Howells 提交于
      Make some miscellaneous changes to the AFS filesystem:
      
       (1) Assert RCU barriers on module exit to make sure RCU has finished with
           callbacks in this module.
      
       (2) Correctly handle the AFS server returning a zero-length read.
      
       (3) Split out data zapping calls into one function (afs_zap_data).
      
       (4) Rename some afs_file_*() functions to afs_*() where they apply to
           non-regular files too.
      
       (5) Be consistent about the presentation of volume ID:vnode ID in debugging
           output.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      416351f2
  31. 03 5月, 2007 3 次提交
  32. 28 4月, 2007 1 次提交
  33. 27 4月, 2007 5 次提交