1. 10 Jan, 2009 6 commits
    • Takashi Sato's avatar
      filesystem freeze: implement generic freeze feature · fcccf502
      Takashi Sato authored
      The ioctls for the generic freeze feature are below.
      o Freeze the filesystem
        int ioctl(int fd, int FIFREEZE, arg)
          fd: The file descriptor of the mountpoint
          FIFREEZE: request code for the freeze
          arg: Ignored
          Return value: 0 if the operation succeeds. Otherwise, -1
      
      o Unfreeze the filesystem
        int ioctl(int fd, int FITHAW, arg)
          fd: The file descriptor of the mountpoint
          FITHAW: request code for unfreeze
          arg: Ignored
          Return value: 0 if the operation succeeds. Otherwise, -1
          Error number: If the filesystem has already been unfrozen,
                        errno is set to EINVAL.
      
      [akpm@linux-foundation.org: fix CONFIG_BLOCK=n]
      Signed-off-by: default avatarTakashi Sato <t-sato@yk.jp.nec.com>
      Signed-off-by: default avatarMasayuki Hamaguchi <m-hamaguchi@ys.jp.nec.com>
      Cc: <xfs-masters@oss.sgi.com>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Alasdair G Kergon <agk@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fcccf502
    • Takashi Sato's avatar
      filesystem freeze: add error handling of write_super_lockfs/unlockfs · c4be0c1d
      Takashi Sato authored
      Currently, ext3 in mainline Linux doesn't have the freeze feature which
      suspends write requests.  So, we cannot take a backup which keeps the
      filesystem's consistency with the storage device's features (snapshot and
      replication) while it is mounted.
      
      In many case, a commercial filesystem (e.g.  VxFS) has the freeze feature
      and it would be used to get the consistent backup.
      
      If Linux's standard filesystem ext3 has the freeze feature, we can do it
      without a commercial filesystem.
      
      So I have implemented the ioctls of the freeze feature.
      I think we can take the consistent backup with the following steps.
      1. Freeze the filesystem with the freeze ioctl.
      2. Separate the replication volume or create the snapshot
         with the storage device's feature.
      3. Unfreeze the filesystem with the unfreeze ioctl.
      4. Take the backup from the separated replication volume
         or the snapshot.
      
      This patch:
      
      VFS:
      Changed the type of write_super_lockfs and unlockfs from "void"
      to "int" so that they can return an error.
      Rename write_super_lockfs and unlockfs of the super block operation
      freeze_fs and unfreeze_fs to avoid a confusion.
      
      ext3, ext4, xfs, gfs2, jfs:
      Changed the type of write_super_lockfs and unlockfs from "void"
      to "int" so that write_super_lockfs returns an error if needed,
      and unlockfs always returns 0.
      
      reiserfs:
      Changed the type of write_super_lockfs and unlockfs from "void"
      to "int" so that they always return 0 (success) to keep a current behavior.
      Signed-off-by: default avatarTakashi Sato <t-sato@yk.jp.nec.com>
      Signed-off-by: default avatarMasayuki Hamaguchi <m-hamaguchi@ys.jp.nec.com>
      Cc: <xfs-masters@oss.sgi.com>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Alasdair G Kergon <agk@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c4be0c1d
    • Harvey Harrison's avatar
      memstick: annotate endianness of attribute structs · 69347a23
      Harvey Harrison authored
      The code was shifting the endianness appropriately everywhere, annotate
      the structs to avoid the sparse warnings when assigning the endian types
      to the struct members, or passing them to be[16|32]_to_cpu:
      
      drivers/memstick/core/mspro_block.c:331:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:333:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:335:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:337:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:341:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:347:4: warning: cast to restricted __be32
      drivers/memstick/core/mspro_block.c:356:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:358:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:364:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:367:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:369:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:371:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:377:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:478:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:480:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:482:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:484:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:486:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:689:22:    expected unsigned int [unsigned] [assigned] data_address
      drivers/memstick/core/mspro_block.c:689:22:    got restricted __be32 [usertype] <noident>
      drivers/memstick/core/mspro_block.c:697:3: warning: cast to restricted __be32
      drivers/memstick/core/mspro_block.c:960:17: warning: incorrect type in initializer (different base types)
      drivers/memstick/core/mspro_block.c:960:17:    expected unsigned short [unsigned] data_count
      drivers/memstick/core/mspro_block.c:960:17:    got restricted __be16 [usertype] <noident>
      drivers/memstick/core/mspro_block.c:993:6: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:995:28: warning: cast to restricted __be16
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Cc: Alex Dubov <oakad@yahoo.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      69347a23
    • Larry Finger's avatar
      hp-wmi: handle rfkill_register() failure · fe8e4e03
      Larry Finger authored
      Compilation of the HP WMI hotkeys code results in the following:
      
        CC [M]  drivers/platform/x86/hp-wmi.o
      drivers/platform/x86/hp-wmi.c: In function hp_wmi_bios_setup:
      drivers/platform/x86/hp-wmi.c:431: warning: ignoring return value of rfkill_register,
      	 declared with attribute warn_unused_result
      drivers/platform/x86/hp-wmi.c:441: warning: ignoring return value of rfkill_register,
      	 declared with attribute warn_unused_result
      drivers/platform/x86/hp-wmi.c:450: warning: ignoring return value of rfkill_register,
      	 declared with attribute warn_unused_result
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Len Brown <lenb@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fe8e4e03
    • Andi Kleen's avatar
      compiler-gcc.h: add more comments to RELOC_HIDE · 85c210ed
      Andi Kleen authored
      Requested by C. Lameter
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Mike Travis <travis@sgi.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Richard Henderson <rth@twiddle.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      85c210ed
    • David Brownell's avatar
      CORE_DUMP_DEFAULT_ELF_HEADERS depends on ELF_CORE · 2d96d105
      David Brownell authored
      Kernels that don't support ELF coredumps at all surely can't be supporting
      new partial-segment flavored ELF coredumps ...  don't make folk answer
      Kconfig questions about that flavor.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: default avatarRoland McGrath <roland@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2d96d105
  2. 09 Jan, 2009 34 commits