1. 08 9月, 2005 7 次提交
    • M
      [PATCH] disk quotas fail when /etc/mtab is symlinked to /proc/mounts · 8fc2751b
      Mark Bellon 提交于
      If /etc/mtab is a regular file all of the mount options (of a file system)
      are written to /etc/mtab by the mount command.  The quota tools look there
      for the quota strings for their operation.  If, however, /etc/mtab is a
      symlink to /proc/mounts (a "good thing" in some environments) the tools
      don't write anything - they assume the kernel will take care of things.
      
      While the quota options are sent down to the kernel via the mount system
      call and the file system codes handle them properly unfortunately there is
      no code to echo the quota strings into /proc/mounts and the quota tools
      fail in the symlink case.
      
      The attached patchs modify the EXT[2|3] and JFS codes to add the necessary
      hooks.  The show_options function of each file system in these patches
      currently deal with only those things that seemed related to quotas;
      especially in the EXT3 case more can be done (later?).
      
      Jan Kara also noted the difficulty in moving these changes above the FS
      codes responding similarly to myself to Andrew's comment about possible
      VFS migration. Issue summary:
      
       - FS codes have to process the entire string of options anyway.
      
       - Only FS codes that use quotas must have a show_options function (for
         quotas to work properly) however quotas are only used in a small number
         of FS.
      
       - Since most of the quota using FS support other options these FS codes
         should have the a show_options function to show those options - and the
         quota echoing becomes virtually negligible.
      
      Based on feedback I have modified my patches from the original:
      
         JFS a missing patch has been restored to the posting
         EXT[2|3] and JFS always use the show_options function
             - Each FS has at least one FS specific option displayed
             - QUOTA output is under a CONFIG_QUOTA ifdef
             - a follow-on patch will add a multitude of options for each FS
         EXT[2|3] and JFS "quota" is treated as "usrquota"
         EXT3 journalled data check for journalled quota removed
         EXT[2|3] mount when quota specified but not compiled in
      
       - no changes from my original patch.  I tested the patch and the codes
         warn but
      
       - still mount.  With all due respection I believe the comments
         otherwise were a
      
       - misread of the patch.  Please reread/test and comment.  XFS patch
         removed - the XFS team already made the necessary changes EXT3 mixing
         old and new quotas are handled differently (not purely exclusive)
      
       - if old and new quotas for the same type are used together the old
         type is silently depricated for compatability (e.g.  usrquota and
         usrjquota)
      
       - mixing of old and new quotas is an error (e.g.  usrjquota and
         grpquota)
      Signed-off-by: NMark Bellon <mbellon@mvista.com>
      Acked-by: NDave Kleikamp <shaggy@austin.ibm.com>
      Cc: Jan Kara <jack@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8fc2751b
    • A
      [PATCH] remove register_ioctl32_conversion and unregister_ioctl32_conversion · 5dd42c26
      Adrian Bunk 提交于
      All users have been converted.
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5dd42c26
    • P
      [PATCH] kill bio->bi_set · 3676347a
      Peter Osterlund 提交于
      Jens:
      
      ->bi_set is totally unnecessary bloat of struct bio.  Just define a proper
      destructor for the bio and it already knows what bio_set it belongs too.
      
      Peter:
      
      Fixed the bugs.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NPeter Osterlund <petero2@telia.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3676347a
    • A
      [PATCH] fs/jbd/: cleanups · 022a4a7b
      Adrian Bunk 提交于
      This patch contains the following cleanups:
      - make needlessly global functions static
      - journal.c: remove the unused global function __journal_internal_check
                   and move the check to journal_init
      - remove the following write-only global variable:
        - journal.c: current_journal
      - remove the following unneeded EXPORT_SYMBOL:
        - journal.c: journal_recover
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Acked-by: NAndreas Dilger <adilger@clusterfs.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      022a4a7b
    • S
      [PATCH] compat: be more consistent about [ug]id_t · 202e5979
      Stephen Rothwell 提交于
      When I first wrote the compat layer patches, I was somewhat cavalier about
      the definition of compat_uid_t and compat_gid_t (or maybe I just
      misunderstood :-)).  This patch makes the compat types much more consistent
      with the types we are being compatible with and hopefully will fix a few
      bugs along the way.
      
      	compat type		type in compat arch
      	__compat_[ug]id_t	__kernel_[ug]id_t
      	__compat_[ug]id32_t	__kernel_[ug]id32_t
      	compat_[ug]id_t		[ug]id_t
      
      The difference is that compat_uid_t is always 32 bits (for the archs we
      care about) but __compat_uid_t may be 16 bits on some.
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      202e5979
    • J
      [PATCH] inotify speedup · 820249ba
      John McCutchan 提交于
      Bypass an inotify-related fastpath spinlock and several function calls on
      systems which have no inotify watches registered.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      820249ba
    • T
      [PATCH] relayfs · e82894f8
      Tom Zanussi 提交于
      Here's the latest version of relayfs, against linux-2.6.11-mm2.  I'm hoping
      you'll consider putting this version back into your tree - the previous
      rounds of comment seem to have shaken out all the API issues and the number
      of comments on the code itself have also steadily dwindled.
      
      This patch is essentially the same as the relayfs redux part 5 patch, with
      some minor changes based on reviewer comments.  Thanks again to Pekka
      Enberg for those.  The patch size without documentation is now a little
      smaller at just over 40k.  Here's a detailed list of the changes:
      
      - removed the attribute_flags in relay open and changed it to a
        boolean specifying either overwrite or no-overwrite mode, and removed
        everything referencing the attribute flags.
      - added a check for NULL names in relayfs_create_entry()
      - got rid of the unnecessary multiple labels in relay_create_buf()
      - some minor simplification of relay_alloc_buf() which got rid of a
        couple params
      - updated the Documentation
      
      In addition, this version (through code contained in the relay-apps tarball
      linked to below, not as part of the relayfs patch) tries to make it as easy
      as possible to create the cooperating kernel/user pieces of a typical and
      common type of logging application, one where kernel logging is kicked off
      when a user space data collection app starts and stops when the collection
      app exits, with the data being automatically logged to disk in between.  To
      create this type of application, you basically just include a header file
      (relay-app.h, included in the relay-apps tarball) in your kernel module,
      define a couple of callbacks and call an initialization function, and on
      the user side call a single function that sets up and continuously monitors
      the buffers, and writes data to files as it becomes available.  Channels
      are created when the collection app is started and destroyed when it exits,
      not when the kernel module is inserted, so different channel buffer sizes
      can be specified for each separate run via command-line options.  See the
      README in the relay-apps tarball for details.
      
      Also included in the relay-apps tarball are a couple examples
      demonstrating how you can use this to create quick and dirty kernel
      logging/debugging applications.  They are:
      
      - tprintk, short for 'tee printk', which temporarily puts a kprobe on
        printk() and writes a duplicate stream of printk output to a relayfs
        channel.  This could be used anywhere there's printk() debugging code
        in the kernel which you'd like to exercise, but would rather not have
        your system logs cluttered with debugging junk.  You'd probably want
        to kill klogd while you do this, otherwise there wouldn't be much
        point (since putting a kprobe on printk() doesn't change the output
        of printk()).  I've used this method to temporarily divert the packet
        logging output of the iptables LOG target from the system logs to
        relayfs files instead, for instance.
      
      - klog, which just provides a printk-like formatted logging function
        on top of relayfs.  Again, you can use this to keep stuff out of your
        system logs if used in place of printk.
      
      The example applications can be found here:
      
      http://prdownloads.sourceforge.net/dprobes/relay-apps.tar.gz?download
      
      From: Christoph Hellwig <hch@lst.de>
      
        avoid lookup_hash usage in relayfs
      Signed-off-by: NTom Zanussi <zanussi@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e82894f8
  2. 05 9月, 2005 4 次提交
    • P
      [PATCH] uml: fixes performance regression in activate_mm and thus exec() · 1e40cd38
      Paolo 'Blaisorblade' Giarrusso 提交于
      Normally, activate_mm() is called from exec(), and thus it used to be a
      no-op because we use a completely new "MM context" on the host (for
      instance, a new process), and so we didn't need to flush any "TLB entries"
      (which for us are the set of memory mappings for the host process from the
      virtual "RAM" file).
      
      Kernel threads, instead, are usually handled in a different way.  So, when
      for AIO we call use_mm(), things used to break and so Benjamin implemented
      activate_mm().  However, that is only needed for AIO, and could slow down
      exec() inside UML, so be smart: detect being called for AIO (via
      PF_BORROWED_MM) and do the full flush only in that situation.
      
      Comment also the caller so that people won't go breaking UML without
      noticing.  I also rely on the caller's locks for testing current->flags.
      Signed-off-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      CC: Benjamin LaHaise <bcrl@kvack.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1e40cd38
    • S
      [PATCH] Generic VFS fallback for security xattrs · f549d6c1
      Stephen Smalley 提交于
      This patch modifies the VFS setxattr, getxattr, and listxattr code to fall
      back to the security module for security xattrs if the filesystem does not
      support xattrs natively.  This allows security modules to export the incore
      inode security label information to userspace even if the filesystem does
      not provide xattr storage, and eliminates the need to individually patch
      various pseudo filesystem types to provide such access.  The patch removes
      the existing xattr code from devpts and tmpfs as it is then no longer
      needed.
      
      The patch restructures the code flow slightly to reduce duplication between
      the normal path and the fallback path, but this should only have one
      user-visible side effect - a program may get -EACCES rather than
      -EOPNOTSUPP if policy denied access but the filesystem didn't support the
      operation anyway.  Note that the post_setxattr hook call is not needed in
      the fallback case, as the inode_setsecurity hook call handles the incore
      inode security state update directly.  In contrast, we do call fsnotify in
      both cases.
      Signed-off-by: NStephen Smalley <sds@tycho.nsa.gov>
      Acked-by: NJames Morris <jmorris@namei.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f549d6c1
    • M
      [PATCH] add /proc/pid/smaps · e070ad49
      Mauricio Lin 提交于
      Add a "smaps" entry to /proc/pid: show howmuch memory is resident in each
      mapping.
      
      People that want to perform a memory consumption analysing can use it
      mainly if someone needs to figure out which libraries can be reduced for
      embedded systems.  So the new features are the physical size of shared and
      clean [or dirty]; private and clean [or dirty].
      
      Take a look the example below:
      
      # cat /proc/4576/smaps
      
      08048000-080dc000 r-xp /bin/bash
      Size:               592 KB
      Rss:                500 KB
      Shared_Clean:       500 KB
      Shared_Dirty:         0 KB
      Private_Clean:        0 KB
      Private_Dirty:        0 KB
      080dc000-080e2000 rw-p /bin/bash
      Size:                24 KB
      Rss:                 24 KB
      Shared_Clean:         0 KB
      Shared_Dirty:         0 KB
      Private_Clean:        0 KB
      Private_Dirty:       24 KB
      080e2000-08116000 rw-p
      Size:               208 KB
      Rss:                208 KB
      Shared_Clean:         0 KB
      Shared_Dirty:         0 KB
      Private_Clean:        0 KB
      Private_Dirty:      208 KB
      b7e2b000-b7e34000 r-xp /lib/tls/libnss_files-2.3.2.so
      Size:                36 KB
      Rss:                 12 KB
      Shared_Clean:        12 KB
      Shared_Dirty:         0 KB
      Private_Clean:        0 KB
      Private_Dirty:        0 KB
      ...
      
      (Includes a cleanup from "Richard Purdie" <rpurdie@rpsys.net>)
      
      From: Torsten Foertsch <torsten.foertsch@gmx.net>
      
      show_smap calls first show_map and then prints its additional information to
      the seq_file.  show_map checks if all it has to print fits into the buffer and
      if yes marks the current vma as written.  While that is correct for show_map
      it is not for show_smap.  Here the vma should be marked as written only after
      the additional information is also written.
      
      The attached patch cures the problem.  It moves the functionality of the
      show_map function to a new function show_map_internal that is called with an
      additional struct mem_size_stats* argument.  Then show_map calls
      show_map_internal with NULL as struct mem_size_stats* whereas show_smap calls
      it with a real pointer.  Now the final
      
      	if (m->count < m->size)  /* vma is copied successfully */
      		m->version = (vma != get_gate_vma(task))? vma->vm_start: 0;
      
      is done only if the whole entry fits into the buffer.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e070ad49
    • C
      [PATCH] /proc/<pid>/numa_maps to show on which nodes pages reside · 6e21c8f1
      Christoph Lameter 提交于
      This patch was recently discussed on linux-mm:
      http://marc.theaimsgroup.com/?t=112085728500002&r=1&w=2
      
      I inherited a large code base from Ray for page migration.  There was a
      small patch in there that I find to be very useful since it allows the
      display of the locality of the pages in use by a process.  I reworked that
      patch and came up with a /proc/<pid>/numa_maps that gives more information
      about the vma's of a process.  numa_maps is indexes by the start address
      found in /proc/<pid>/maps.  F.e.  with this patch you can see the page use
      of the "getty" process:
      
      margin:/proc/12008 # cat maps
      00000000-00004000 r--p 00000000 00:00 0
      2000000000000000-200000000002c000 r-xp 00000000 08:04 516                /lib/ld-2.3.3.so
      2000000000038000-2000000000040000 rw-p 00028000 08:04 516                /lib/ld-2.3.3.so
      2000000000040000-2000000000044000 rw-p 2000000000040000 00:00 0
      2000000000058000-2000000000260000 r-xp 00000000 08:04 54707842           /lib/tls/libc.so.6.1
      2000000000260000-2000000000268000 ---p 00208000 08:04 54707842           /lib/tls/libc.so.6.1
      2000000000268000-2000000000274000 rw-p 00200000 08:04 54707842           /lib/tls/libc.so.6.1
      2000000000274000-2000000000280000 rw-p 2000000000274000 00:00 0
      2000000000280000-20000000002b4000 r--p 00000000 08:04 9126923            /usr/lib/locale/en_US.utf8/LC_CTYPE
      2000000000300000-2000000000308000 r--s 00000000 08:04 60071467           /usr/lib/gconv/gconv-modules.cache
      2000000000318000-2000000000328000 rw-p 2000000000318000 00:00 0
      4000000000000000-4000000000008000 r-xp 00000000 08:04 29576399           /sbin/mingetty
      6000000000004000-6000000000008000 rw-p 00004000 08:04 29576399           /sbin/mingetty
      6000000000008000-600000000002c000 rw-p 6000000000008000 00:00 0          [heap]
      60000fff7fffc000-60000fff80000000 rw-p 60000fff7fffc000 00:00 0
      60000ffffff44000-60000ffffff98000 rw-p 60000ffffff44000 00:00 0          [stack]
      a000000000000000-a000000000020000 ---p 00000000 00:00 0                  [vdso]
      
      cat numa_maps
      2000000000000000 default MaxRef=43 Pages=11 Mapped=11 N0=4 N1=3 N2=2 N3=2
      2000000000038000 default MaxRef=1 Pages=2 Mapped=2 Anon=2 N0=2
      2000000000040000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1
      2000000000058000 default MaxRef=43 Pages=61 Mapped=61 N0=14 N1=15 N2=16 N3=16
      2000000000268000 default MaxRef=1 Pages=2 Mapped=2 Anon=2 N0=2
      2000000000274000 default MaxRef=1 Pages=3 Mapped=3 Anon=3 N0=3
      2000000000280000 default MaxRef=8 Pages=3 Mapped=3 N0=3
      2000000000300000 default MaxRef=8 Pages=2 Mapped=2 N0=2
      2000000000318000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N2=1
      4000000000000000 default MaxRef=6 Pages=2 Mapped=2 N1=2
      6000000000004000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1
      6000000000008000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1
      60000fff7fffc000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1
      60000ffffff44000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1
      
      getty uses ld.so.  The first vma is the code segment which is used by 43
      other processes and the pages are evenly distributed over the 4 nodes.
      
      The second vma is the process specific data portion for ld.so.  This is
      only one page.
      
      The display format is:
      
      <startaddress>	 Links to information in /proc/<pid>/map
      <memory policy>  This can be "default" "interleave={}", "prefer=<node>" or "bind={<zones>}"
      MaxRef=		<maximum reference to a page in this vma>
      Pages=		<Nr of pages in use>
      Mapped=		<Nr of pages with mapcount >
      Anon=		<nr of anonymous pages>
      Nx=		<Nr of pages on Node x>
      
      The content of the proc-file is self-evident.  If this would be tied into
      the sparsemem system then the contents of this file would not be too
      useful.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Cc: Hugh Dickins <hugh@veritas.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6e21c8f1
  3. 02 9月, 2005 3 次提交
  4. 30 8月, 2005 1 次提交
  5. 27 8月, 2005 5 次提交
  6. 21 8月, 2005 4 次提交
  7. 20 8月, 2005 4 次提交
    • S
      [PATCH] NFSv4: unbalanced BKL in nfs_atomic_lookup() · 01c314a0
      Steve Dickson 提交于
      Added missing unlock_kernel() to NFSv4 atomic lookup.
      Signed-off-by: NSteve Dickson <steved@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      01c314a0
    • A
      [PATCH] Fix up symlink function pointers · 008b150a
      Al Viro 提交于
      This fixes up the symlink functions for the calling convention change:
      
       * afs, autofs4, befs, devfs, freevxfs, jffs2, jfs, ncpfs, procfs,
         smbfs, sysvfs, ufs, xfs - prototype change for ->follow_link()
       * befs, smbfs, xfs - same for ->put_link()
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      008b150a
    • L
      Fix nasty ncpfs symlink handling bug. · cc314eef
      Linus Torvalds 提交于
      This bug could cause oopses and page state corruption, because ncpfs
      used the generic page-cache symlink handlign functions.  But those
      functions only work if the page cache is guaranteed to be "stable", ie a
      page that was installed when the symlink walk was started has to still
      be installed in the page cache at the end of the walk.
      
      We could have fixed ncpfs to not use the generic helper routines, but it
      is in many ways much cleaner to instead improve on the symlink walking
      helper routines so that they don't require that absolute stability.
      
      We do this by allowing "follow_link()" to return a error-pointer as a
      cookie, which is fed back to the cleanup "put_link()" routine.  This
      also simplifies NFS symlink handling.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cc314eef
    • A
      [PATCH] jffs2: fix symlink error handling · 2fb1e308
      Al Viro 提交于
      The current calling conventions for ->follow_link() are already fairly
      complex.
      
      What we have is
      	1) you can return -error; then you must release nameidata yourself
      	   and ->put_link() will _not_ be called.
      	2) you can do nd_set_link(nd, ERR_PTR(-error)) and return 0
      	3) you can do nd_set_link(nd, path) and return 0
      	4) you can return 0 (after having moved nameidata yourself)
      
      jffs2 follow_link() is broken - it has an exit where it returns
      -EIO and leaks nameidata.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2fb1e308
  8. 19 8月, 2005 4 次提交
  9. 18 8月, 2005 2 次提交
  10. 17 8月, 2005 2 次提交
  11. 16 8月, 2005 4 次提交