1. 03 10月, 2006 7 次提交
  2. 01 10月, 2006 1 次提交
    • D
      [PATCH] BLOCK: Make it possible to disable the block layer [try #6] · 9361401e
      David Howells 提交于
      Make it possible to disable the block layer.  Not all embedded devices require
      it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require
      the block layer to be present.
      
      This patch does the following:
      
       (*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev
           support.
      
       (*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls
           an item that uses the block layer.  This includes:
      
           (*) Block I/O tracing.
      
           (*) Disk partition code.
      
           (*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS.
      
           (*) The SCSI layer.  As far as I can tell, even SCSI chardevs use the
           	 block layer to do scheduling.  Some drivers that use SCSI facilities -
           	 such as USB storage - end up disabled indirectly from this.
      
           (*) Various block-based device drivers, such as IDE and the old CDROM
           	 drivers.
      
           (*) MTD blockdev handling and FTL.
      
           (*) JFFS - which uses set_bdev_super(), something it could avoid doing by
           	 taking a leaf out of JFFS2's book.
      
       (*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and
           linux/elevator.h contingent on CONFIG_BLOCK being set.  sector_div() is,
           however, still used in places, and so is still available.
      
       (*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and
           parts of linux/fs.h.
      
       (*) Makes a number of files in fs/ contingent on CONFIG_BLOCK.
      
       (*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK.
      
       (*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK
           is not enabled.
      
       (*) fs/no-block.c is created to hold out-of-line stubs and things that are
           required when CONFIG_BLOCK is not set:
      
           (*) Default blockdev file operations (to give error ENODEV on opening).
      
       (*) Makes some /proc changes:
      
           (*) /proc/devices does not list any blockdevs.
      
           (*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK.
      
       (*) Makes some compat ioctl handling contingent on CONFIG_BLOCK.
      
       (*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if
           given command other than Q_SYNC or if a special device is specified.
      
       (*) In init/do_mounts.c, no reference is made to the blockdev routines if
           CONFIG_BLOCK is not defined.  This does not prohibit NFS roots or JFFS2.
      
       (*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return
           error ENOSYS by way of cond_syscall if so).
      
       (*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if
           CONFIG_BLOCK is not set, since they can't then happen.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      9361401e
  3. 19 9月, 2006 1 次提交
  4. 11 7月, 2006 1 次提交
    • N
      [PATCH] md: fix resync speed calculation for restarted resyncs · ff4e8d9a
      NeilBrown 提交于
      We introduced 'io_sectors' recently so we could count the sectors that causes
      io during resync separate from sectors which didn't cause IO - there can be a
      difference if a bitmap is being used to accelerate resync.
      
      However when a speed is reported, we find the number of sectors processed
      recently by subtracting an oldish io_sectors count from a current
      'curr_resync' count.  This is wrong because curr_resync counts all sectors,
      not just io sectors.
      
      So, add a field to mddev to store the curren io_sectors separately from
      curr_resync, and use that in the calculations.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ff4e8d9a
  5. 27 6月, 2006 9 次提交
  6. 18 6月, 2006 1 次提交
  7. 11 4月, 2006 1 次提交
    • N
      [PATCH] md: make sure 64bit fields in version-1 metadata are 64-bit aligned · 6f91fe88
      NeilBrown 提交于
      reshape_position is a 64bit field that was not 64bit aligned.  So swap with
      new_level.
      
      NOTE: this is a user-visible change.  However:
        - The bad code has not appeared in a released kernel
        - This code is still marked 'experimental'
        - This only affects version-1 superblock, which are not in wide use
        - These field are only used (rather than simply reported) by user-space
          tools in extemely rare circumstances : after a reshape crashes in the
          first second of the reshape process.
      
      So I believe that, at this stage, the change is safe.  Especially if people
      heed the 'help' message on use mdadm-2.4.1.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6f91fe88
  8. 28 3月, 2006 10 次提交
  9. 23 3月, 2006 1 次提交
  10. 07 1月, 2006 8 次提交