1. 22 4月, 2006 3 次提交
  2. 21 4月, 2006 2 次提交
    • D
      [GFS2] journal recovery patch · c63e31c2
      David Teigland 提交于
      This is one of the changes related to journal recovery I mentioned a
      couple weeks ago.  We can get into a situation where there are only
      readonly nodes currently mounting the fs, but there are journals that need
      to be recovered.  Since the readonly nodes can't recover journals, the
      next rw mounter needs to go through and check all journals and recover any
      that are dirty (i.e. what the first node to mount the fs does).  This rw
      mounter needs to skip the journals held by the existing readonly nodes.
      Skipping those journals amounts to using the TRY flag on the journal locks
      so acquiring the lock of a journal held by a readonly node will fail
      instead of blocking indefinately.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      c63e31c2
    • S
      [GFS2] Fix a bug: scheduling under a spinlock · 190562bd
      Steven Whitehouse 提交于
      At some stage, a mutex was added to gfs2_glock_put() without
      checking all its call sites. Two of them were called from
      under a spinlock causing random delays at various points and
      crashes.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      190562bd
  3. 20 4月, 2006 9 次提交
  4. 19 4月, 2006 7 次提交
  5. 18 4月, 2006 3 次提交
  6. 15 4月, 2006 2 次提交
    • K
      [PATCH] BLOCK: delay all uevents until partition table is scanned · d4d7e5df
      Kay Sievers 提交于
      [BLOCK] delay all uevents until partition table is scanned
      
      Here we delay the annoucement of all block device events until the
      disk's partition table is scanned and all partition devices are already
      created and sysfs is populated.
      
      We have a bunch of old bugs for removable storage handling where we
      probe successfully for a filesystem on the raw disk, but at the
      same time the kernel recognizes a partition table and creates partition
      devices.
      Currently there is no sane way to tell if partitions will show up or not
      at the time the disk device is announced to userspace. With the delayed
      events we can simply skip any probe for a filesystem on the raw disk when
      we find already present partitions.
      Signed-off-by: NKay Sievers <kay.sievers@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d4d7e5df
    • N
      [PATCH] sysfs: Allow sysfs attribute files to be pollable · 4508a7a7
      NeilBrown 提交于
      It works like this:
        Open the file
        Read all the contents.
        Call poll requesting POLLERR or POLLPRI (so select/exceptfds works)
        When poll returns,
           close the file and go to top of loop.
         or lseek to start of file and go back to the 'read'.
      
      Events are signaled by an object manager calling
         sysfs_notify(kobj, dir, attr);
      
      If the dir is non-NULL, it is used to find a subdirectory which
      contains the attribute (presumably created by sysfs_create_group).
      
      This has a cost of one int  per attribute, one wait_queuehead per kobject,
      one int per open file.
      
      The name "sysfs_notify" may be confused with the inotify
      functionality.  Maybe it would be nice to support inotify for sysfs
      attributes as well?
      
      This patch also uses sysfs_notify to allow /sys/block/md*/md/sync_action
      to be pollable
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4508a7a7
  7. 14 4月, 2006 1 次提交
    • E
      [PATCH] de_thread: Don't change our parents and ptrace flags. · c06511d1
      Eric W. Biederman 提交于
      This is two distinct changes.
       - Not changing our real parents.
       - Not changing our ptrace parents.
      
      Not changing our real parents is trivially correct because both tasks
      have the same real parents as they are part of a thread group.  Now that
      we demote the leader to a thread there is no longer any reason to change
      it's parentage.
      
      Not changing our ptrace parents is a user visible change if someone
      looks hard enough.  I don't think user space applications will care or
      even notice.
      
      In the practical and I think common case a debugger will have attached
      to all of the threads using the same ptrace flags.  From my quick skim
      of strace and gdb that appears to be the case.  Which if true means
      debuggers will not notice a change.
      
      Before this point we have already generated a ptrace event in do_exit
      that reports the leaders pid has died so de_thread is visible to a
      debugger.  Which means attempting to hide this case by copying flags
      around appears excessive.
      
      By not doing anything it avoids all of the weird locking issues between
      de_thread and ptrace attach, and removes one case from consideration for
      fixing the ptrace locking.
      
      This only addresses Oleg's first concern with ptrace_attach, that of the
      problems caused by reparenting.  Oleg's second concern is essentially a
      race between ptrace_attach and release_task that causes an oops when we
      get to force_sig_specific.  There is nothing special about de_thread
      with respect to that race.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c06511d1
  8. 13 4月, 2006 1 次提交
  9. 12 4月, 2006 5 次提交
    • M
      [fuse] Direct I/O should not use fuse_reset_request · 56cf34ff
      Miklos Szeredi 提交于
      It's cleaner to allocate a new request, otherwise the uid/gid/pid
      fields of the request won't be filled in.
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      56cf34ff
    • M
      [fuse] Don't init request twice · 4858cae4
      Miklos Szeredi 提交于
      Request is already initialized in fuse_request_alloc() so no need to
      do it again in fuse_get_req().
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      4858cae4
    • M
      [fuse] Fix accounting the number of waiting requests · 9bc5ddda
      Miklos Szeredi 提交于
      Properly accounting the number of waiting requests was forgotten in
      "clean up request accounting" patch.
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      9bc5ddda
    • M
      [fuse] fix deadlock between fuse_put_super() and request_end() · 73ce8355
      Miklos Szeredi 提交于
      A deadlock was possible, when the last reference to the superblock was
      held due to a background request containing a file reference.
      
      Releasing the file would release the vfsmount which in turn would
      release the superblock.  Since sbput_sem is held during the fput() and
      fuse_put_super() tries to acquire this same semaphore, a deadlock
      results.
      
      The chosen soltuion is to get rid of sbput_sem, and instead use the
      spinlock to ensure the referenced inodes/file are released only once.
      Since the actual release may sleep, defer these outside the locked
      region, but using local variables instead of the structure members.
      
      This is a much more rubust solution.
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      73ce8355
    • S
      [GFS2] Update journal accounting code. · f4154ea0
      Steven Whitehouse 提交于
      A small update to the journaling code to change the way that
      the "extra" blocks are accounted for in the journal. These are
      used at a rate of one per 503 metadata blocks or one per 251
      journaled data blocks (or just one if the total number of journaled
      blocks in the transaction is smaller). Since we are using them at
      two different rates the old method of accounting for them no longer
      works and we count them up as required.
      
      Since the "per transaction" accounting can't handle this (there is no
      fixed number of header blocks per transaction) we have to account for
      it in the general journal code. We now require that each transaction
      reserves more blocks than it actually needs to take account of the
      possible extra blocks.
      
      Also a final fix to dir.c to ensure that all ref counts are handled
      correctly.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f4154ea0
  10. 11 4月, 2006 7 次提交