1. 23 Oct, 2010 40 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 · ab34c02a
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: (36 commits)
        nilfs2: eliminate sparse warning - "context imbalance"
        nilfs2: eliminate sparse warnings - "symbol not declared"
        nilfs2: get rid of bdi from nilfs object
        nilfs2: change license of exported header file
        nilfs2: add bdev freeze/thaw support
        nilfs2: accept 64-bit checkpoint numbers in cp mount option
        nilfs2: remove own inode allocator and destructor for metadata files
        nilfs2: get rid of back pointer to writable sb instance
        nilfs2: get rid of mi_nilfs back pointer to nilfs object
        nilfs2: see state of root dentry for mount check of snapshots
        nilfs2: use iget for all metadata files
        nilfs2: get rid of GCDAT inode
        nilfs2: add routines to redirect access to buffers of DAT file
        nilfs2: add routines to roll back state of DAT file
        nilfs2: add routines to save and restore bmap state
        nilfs2: do not allocate nilfs_mdt_info structure to gc-inodes
        nilfs2: allow nilfs_clear_inode to clear metadata file inodes
        nilfs2: get rid of snapshot mount flag
        nilfs2: simplify life cycle management of nilfs object
        nilfs2: do not allocate multiple super block instances for a device
        ...
      ab34c02a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin · 7f388396
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (47 commits)
        Blackfin: bfin_spi.h: add MMR peripheral layout
        Blackfin: bfin_ppi.h: start a common PPI/EPPI header
        Blackfin: bfin_can.h: add missing VERSION/VERSION2 MMRs
        Blackfin: bf538: add missing SIC_RVECT define
        Blackfin: bf561: rewrite SICA_xxx to just SIC_xxx
        Blackfin: bf54x: add missing SIC_RVECT definition
        Blackfin: H8606: move 8250 irqflags to platform resources
        Blackfin: glue XIP/ROM kernel kconfigs
        Blackfin: update sparse flags for latest upstream changes
        Blackfin: coreb: update ioctl numbers
        Blackfin: coreb: add gpl module license
        Blackfin: bf518-ezkit: add ssm2603 codec resources
        Blackfin: bf51x/bf52x: fix 16/32bit SPORT MMR helpers
        Blackfin: tll6527m: new board port
        Blackfin: bf526-ezbrd/bf527-ezkit: add NAND partition for u-boot
        Blackfin: merge kernel init memory back into main memory region
        Blackfin: gpio: add peripheral group check
        Blackfin: dma: bf54x: add missing break for SPORT1 TX IRQ
        Blackfin: add new cacheflush syscall
        Blackfin: bf548-ezkit: increase u-boot partition size
        ...
      7f388396
    • Linus Torvalds's avatar
      Merge branch 'x86-trampoline-for-linus' of... · 10f2a2b0
      Linus Torvalds authored
      Merge branch 'x86-trampoline-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'x86-trampoline-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86-32, mm: Add an initial page table for core bootstrapping
      10f2a2b0
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb · 88140116
      Linus Torvalds authored
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
        kdb,debug_core: adjust master cpu switch logic against new debug_core locking
        debug_core: refactor locking for master/slave cpus
        x86,kgdb: remove unnecessary call to kgdb_correct_hw_break()
        debug_core: disable hw_breakpoints on all cores in kgdb_cpu_enter()
        kdb,kgdb: fix sparse fixups
        kdb: Fix oops in kdb_unregister
        kdb,ftdump: Remove reference to internal kdb include
        kdb: Allow kernel loadable modules to add kdb shell functions
        debug_core: stop rcu warnings on kernel resume
        debug_core: move all watch dog syncs to a single function
        x86,kgdb: fix debugger hw breakpoint test regression in 2.6.35
      88140116
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 · 5cc10350
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (141 commits)
        USB: mct_u232: fix broken close
        USB: gadget: amd5536udc.c: fix error path
        USB: imx21-hcd - fix off by one resource size calculation
        usb: gadget: fix Kconfig warning
        usb: r8a66597-udc: Add processing when USB was removed.
        mxc_udc: add workaround for ENGcm09152 for i.MX35
        USB: ftdi_sio: add device ids for ScienceScope
        USB: musb: AM35x: Workaround for fifo read issue
        USB: musb: add musb support for AM35x
        USB: AM35x: Add musb support
        usb: Fix linker errors with CONFIG_PM=n
        USB: ohci-sh - use resource_size instead of defining its own resource_len macro
        USB: isp1362-hcd - use resource_size instead of defining its own resource_len macro
        USB: isp116x-hcd - use resource_size instead of defining its own resource_len macro
        USB: xhci: Fix compile error when CONFIG_PM=n
        USB: accept some invalid ep0-maxpacket values
        USB: xHCI: PCI power management implementation
        USB: xHCI: bus power management implementation
        USB: xHCI: port remote wakeup implementation
        USB: xHCI: port power management implementation
        ...
      
      Manually fix up (non-data) conflict: the SCSI merge gad renamed the
      'hw_sector_size' member to 'physical_block_size', and the USB tree
      brought a new use of it.
      5cc10350
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 · 73ecf3a6
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (49 commits)
        serial8250: ratelimit "too much work" error
        serial: bfin_sport_uart: speed up sport RX sample rate to be 3% faster
        serial: abstraction for 8250 legacy ports
        serial/imx: check that the buffer is non-empty before sending it out
        serial: mfd: add more baud rates support
        jsm: Remove the uart port on errors
        Alchemy: Add UART PM methods.
        8250: allow platforms to override PM hook.
        altera_uart: Don't use plain integer as NULL pointer
        altera_uart: Fix missing prototype for registering an early console
        altera_uart: Fixup type usage of port flags
        altera_uart: Make it possible to use Altera UART and 8250 ports together
        altera_uart: Add support for different address strides
        altera_uart: Add support for getting mapbase and IRQ from resources
        altera_uart: Add support for polling mode (IRQ-less)
        serial: Factor out uart_poll_timeout() from 8250 driver
        serial: mark the 8250 driver as maintained
        serial: 8250: Don't delay after transmitter is ready.
        tty: MAINTAINERS: add drivers/serial/jsm/ as maintained driver
        vcs: invoke the vt update callback when /dev/vcs* is written to
        ...
      73ecf3a6
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 · b9da0571
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (31 commits)
        driver core: Display error codes when class suspend fails
        Driver core: Add section count to memory_block struct
        Driver core: Add mutex for adding/removing memory blocks
        Driver core: Move find_memory_block routine
        hpilo: Despecificate driver from iLO generation
        driver core: Convert link_mem_sections to use find_memory_block_hinted.
        driver core: Introduce find_memory_block_hinted which utilizes kset_find_obj_hinted.
        kobject: Introduce kset_find_obj_hinted.
        driver core: fix build for CONFIG_BLOCK not enabled
        driver-core: base: change to new flag variable
        sysfs: only access bin file vm_ops with the active lock
        sysfs: Fail bin file mmap if vma close is implemented.
        FW_LOADER: fix kconfig dependency warning on HOTPLUG
        uio: Statically allocate uio_class and use class .dev_attrs.
        uio: Support 2^MINOR_BITS minors
        uio: Cleanup irq handling.
        uio: Don't clear driver data
        uio: Fix lack of locking in init_uio_class
        SYSFS: Allow boot time switching between deprecated and modern sysfs layout
        driver core: remove CONFIG_SYSFS_DEPRECATED_V2 but keep it for block devices
        ...
      b9da0571
    • Linus Torvalds's avatar
      ocfs2: drop the BLKDEV_IFL_WAIT flag · f8cae0f0
      Linus Torvalds authored
      Commit dd3932ed ("block: remove BLKDEV_IFL_WAIT") had removed the
      flag argument to blkdev_issue_flush(), but the ocfs2 merge brought in a
      new one.  It didn't cause a merge conflict, so the merges silently
      worked out fine, but the result didn't actually compile.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f8cae0f0
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 · d2ecad9f
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (56 commits)
        [CIFS] move close processing  from cifs_close to cifsFileInfo_put
        cifs: convert cifs_tcp_ses_lock from a rwlock to a spinlock
        cifs: cancel_delayed_work() + flush_scheduled_work() -> cancel_delayed_work_sync()
        Clean up two declarations of blob_len
        cifs: move cifsFileInfo_put to file.c
        cifs: convert GlobalSMBSeslock from a rwlock to regular spinlock
        [CIFS] Fix minor checkpatch warning and update cifs version
        cifs: move cifs_new_fileinfo to file.c
        cifs: eliminate pfile pointer from cifsFileInfo
        cifs: cifs_write argument change and cleanup
        cifs: clean up cifs_reopen_file
        cifs: eliminate the inode argument from cifs_new_fileinfo
        cifs: eliminate oflags option from cifs_new_fileinfo
        cifs: fix flags handling in cifs_posix_open
        cifs: eliminate cifs_posix_open_inode_helper
        cifs: handle FindFirst failure gracefully
        NTLM authentication and signing - Calculate auth response per smb session
        cifs: don't use vfsmount to pin superblock for oplock breaks
        cifs: keep dentry reference in cifsFileInfo instead of inode reference
        cifs: on multiuser mount, set ownership to current_fsuid/current_fsgid (try #7)
        ...
      
      Fix up trivial conflict in fs/cifs/cifsfs.c due to added/removed header files
      d2ecad9f
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 · c70b5296
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (84 commits)
        [SCSI] be2iscsi: SGE Len == 64K
        [SCSI] be2iscsi: Remove premature free of cid
        [SCSI] be2iscsi: More time for FW
        [SCSI] libsas: fix bug for vacant phy
        [SCSI] sd: Fix overflow with big physical blocks
        [SCSI] st: add MTWEOFI to write filemarks without flushing drive buffer
        [SCSI] libsas: Don't issue commands to devices that have been hot-removed
        [SCSI] megaraid_sas: Add Online Controller Reset to MegaRAID SAS drive
        [SCSI] lpfc 8.3.17: Update lpfc driver version to 8.3.17
        [SCSI] lpfc 8.3.17: Replace function reset methodology
        [SCSI] lpfc 8.3.17: SCSI fixes
        [SCSI] lpfc 8.3.17: BSG fixes
        [SCSI] lpfc 8.3.17: SLI Additions and Fixes
        [SCSI] lpfc 8.3.17: Code Cleanup and Locking fixes
        [SCSI] zfcp: Remove scsi_cmnd->serial_number from debug traces
        [SCSI] ipr: fix array error logging
        [SCSI] aha152x: enable PCMCIA on 64bit
        [SCSI] scsi_dh_alua: Handle all states correctly
        [SCSI] cxgb4i: connection and ddp setting update
        [SCSI] cxgb3i: fixed connection over vlan
        ...
      c70b5296
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · 80c226fb
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k: Add missing I/O macros {in,out}{w,l}_p() for !CONFIG_ISA
        m68k: Remove big kernel lock in cache flush code
        m68k: __pa(): cast arg to long
        fbdev: atafb - Remove undead ifdef ATAFB_FALCON
        zorro: Fix device_register() error handling
        fbdev/m68k: Fix section mismatches in q40fb.c
        m68k/m68knommu: merge the MMU and non-MMU traps.h
        m68k/m68knommu: merge MMU and non-MMU thread_info.h
        m68k/m68knommu: merge MMU and non-MMU atomic.h
        m68k/m68knommu: clean up page.h
        m68k/m68knommu: merge machdep.h files into a single file
        m68k/m68knommu: merge MMU and non-MMU string.h
        m68k/m68knommu: Remove dead SMP config option
        m68k: move definition of THREAD_SIZE into thread_info_mm.h
        m68k: Use asm-generic/ioctls.h (enables termiox)
        m68k: Remove dead GG2 config option
      80c226fb
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm · 2c15bd00
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
        dlm: Fix dlm lock status block comment in dlm.h
        dlm: Don't send callback to node making lock request when "try 1cb" fails
      2c15bd00
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs · 5fe3a5ae
      Linus Torvalds authored
      * 'for-linus' of git://oss.sgi.com/xfs/xfs: (36 commits)
        xfs: semaphore cleanup
        xfs: Extend project quotas to support 32bit project ids
        xfs: remove xfs_buf wrappers
        xfs: remove xfs_cred.h
        xfs: remove xfs_globals.h
        xfs: remove xfs_version.h
        xfs: remove xfs_refcache.h
        xfs: fix the xfs_trans_committed
        xfs: remove unused t_callback field in struct xfs_trans
        xfs: fix bogus m_maxagi check in xfs_iget
        xfs: do not use xfs_mod_incore_sb_batch for per-cpu counters
        xfs: do not use xfs_mod_incore_sb for per-cpu counters
        xfs: remove XFS_MOUNT_NO_PERCPU_SB
        xfs: pack xfs_buf structure more tightly
        xfs: convert buffer cache hash to rbtree
        xfs: serialise inode reclaim within an AG
        xfs: batch inode reclaim lookup
        xfs: implement batched inode lookups for AG walking
        xfs: split out inode walk inode grabbing
        xfs: split inode AG walking into separate code for reclaim
        ...
      5fe3a5ae
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu · 0fc0531e
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
        percpu: update comments to reflect that percpu allocations are always zero-filled
        percpu: Optimize __get_cpu_var()
        x86, percpu: Optimize this_cpu_ptr
        percpu: clear memory allocated with the km allocator
        percpu: fix build breakage on s390 and cleanup build configuration tests
        percpu: use percpu allocator on UP too
        percpu: reduce PCPU_MIN_UNIT_SIZE to 32k
        vmalloc: pcpu_get/free_vm_areas() aren't needed on UP
      
      Fixed up trivial conflicts in include/linux/percpu.h
      0fc0531e
    • Jiro SEKIBA's avatar
      nilfs2: eliminate sparse warning - "context imbalance" · 6b81e14e
      Jiro SEKIBA authored
      insert sparse annotations to fix following sparse warning.
      
      fs/nilfs2/segment.c:2681:3: warning: context imbalance in 'nilfs_segctor_kill_thread' - unexpected unlock
      
      nilfs_segctor_kill_thread is only called inside sc_state_lock lock.
      sparse doesn't detect the context and warn "unexpected unlock".
      __acquires/__releases pretend to lock/unlock the sc_state_lock for sparse.
      Signed-off-by: default avatarJiro SEKIBA <jir@unicus.jp>
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      6b81e14e
    • Jiro SEKIBA's avatar
      nilfs2: eliminate sparse warnings - "symbol not declared" · abc0b50b
      Jiro SEKIBA authored
      change nilfs_dat_commit_free and nilfs_inode_cachep static
      to fix following warnings
      
      fs/nilfs2/super.c:72:19: warning: symbol 'nilfs_inode_cachep' was not declared. Should it be static?
      fs/nilfs2/dat.c:106:6: warning: symbol 'nilfs_dat_commit_free' was not declared. Should it be static?
      Signed-off-by: default avatarJiro SEKIBA <jir@unicus.jp>
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      abc0b50b
    • Ryusuke Konishi's avatar
      nilfs2: get rid of bdi from nilfs object · 026a7d63
      Ryusuke Konishi authored
      Nilfs now can use sb->s_bdi to get backing_dev_info, so we use it
      instead of ns_bdi on the nilfs object and remove ns_bdi.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      026a7d63
    • Ryusuke Konishi's avatar
      nilfs2: change license of exported header file · c486f389
      Ryusuke Konishi authored
      This allows other projects to carry copies of the header file related
      to ABI and disk format (i.e. "nilfs2_fs.h") without it or distributors
      having to worry about effects on the project's overall license terms.
      It's also desired for switching the license of nilfs library to LGPL.
      
      Jiro SEKIBA pointed out these license issues (Message-ID:
      <87tylo7msw.wl%jir@sekiba.com>), and he suggested switching license of
      the library and nilfs2_fs.h to GNU Lesser General Public License.  We
      take in his suggestion to avoid the license issues.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Cc: Jiro SEKIBA <jir@unicus.jp>
      Cc: linux-nilfs <linux-nilfs@vger.kernel.org>
      c486f389
    • Ryusuke Konishi's avatar
      nilfs2: add bdev freeze/thaw support · 5beb6e0b
      Ryusuke Konishi authored
      Nilfs hasn't supported the freeze/thaw feature because it didn't work
      due to the peculiar design that multiple super block instances could
      be allocated for a device.  This limitation was removed by the patch
      "nilfs2: do not allocate multiple super block instances for a device".
      
      So now this adds the freeze/thaw support to nilfs.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      5beb6e0b
    • Ryusuke Konishi's avatar
      nilfs2: accept 64-bit checkpoint numbers in cp mount option · c05dbfc2
      Ryusuke Konishi authored
      The current implementation doesn't mount snapshots with checkpoint
      numbers larger than INT_MAX since it uses match_int() for parsing
      "cp=" mount option.
      
      This uses simple_strtoull() for the conversion to resolve the issue.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      c05dbfc2
    • Ryusuke Konishi's avatar
      nilfs2: remove own inode allocator and destructor for metadata files · 2879ed66
      Ryusuke Konishi authored
      This finally removes own inode allocator and destructor functions for
      metadata files.  Several routines, nilfs_mdt_new(),
      nilfs_mdt_new_common(), nilfs_mdt_clear(), nilfs_mdt_destroy(), and
      nilfs_alloc_inode_common() will be gone.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      2879ed66
    • Ryusuke Konishi's avatar
      nilfs2: get rid of back pointer to writable sb instance · 090fd5b1
      Ryusuke Konishi authored
      Nilfs object holds a back pointer to a writable super block instance
      in nilfs->ns_writer, and this became eliminable since sb is now made
      per device and all inodes have a valid pointer to it.
      
      This deletes the ns_writer pointer and a reader/writer semaphore
      protecting it.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      090fd5b1
    • Ryusuke Konishi's avatar
      nilfs2: get rid of mi_nilfs back pointer to nilfs object · c6e07188
      Ryusuke Konishi authored
      This removes a back pointer to nilfs object from nilfs_mdt_info
      structure that is attached to metadata files.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      c6e07188
    • Ryusuke Konishi's avatar
      nilfs2: see state of root dentry for mount check of snapshots · 032dbb3b
      Ryusuke Konishi authored
      After applied the patch that unified sb instances, root dentry of
      snapshots can be left in dcache even after their trees are unmounted.
      
      The orphan root dentry/inode keeps a root object, and this causes
      false positive of nilfs_checkpoint_is_mounted function.
      
      This resolves the issue by having nilfs_checkpoint_is_mounted test
      whether the root dentry is busy or not.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      032dbb3b
    • Ryusuke Konishi's avatar
      nilfs2: use iget for all metadata files · f1e89c86
      Ryusuke Konishi authored
      This makes use of iget5_locked to allocate or get inode for metadata
      files to stop using own inode allocator.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      f1e89c86
    • Ryusuke Konishi's avatar
      nilfs2: get rid of GCDAT inode · c1c1d709
      Ryusuke Konishi authored
      This applies prepared rollback function and redirect function of
      metadata file to DAT file, and eliminates GCDAT inode.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      c1c1d709
    • Ryusuke Konishi's avatar
      nilfs2: add routines to redirect access to buffers of DAT file · b1f6a4f2
      Ryusuke Konishi authored
      During garbage collection (GC), DAT file, which converts virtual block
      number to real block number, may return disk block number that is not
      yet written to the device.
      
      To avoid access to unwritten blocks, the current implementation stores
      changes to the caches of GCDAT during GC and atomically commit the
      changes into the DAT file after they are written to the device.
      
      This patch, instead, adds a function that makes a copy of specified
      buffer and stores it in nilfs_shadow_map, and a function to get the
      backup copy as needed (nilfs_mdt_freeze_buffer and
      nilfs_mdt_get_frozen_buffer respectively).
      
      Before DAT changes block number in an entry block, it makes a copy and
      redirect access to the buffer so that address conversion function
      (i.e. nilfs_dat_translate) refers to the old address saved in the
      copy.
      
      This patch gives requisites for such redirection.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      b1f6a4f2
    • Ryusuke Konishi's avatar
      nilfs2: add routines to roll back state of DAT file · ebdfed4d
      Ryusuke Konishi authored
      This adds optional function to metadata files which makes a copy of
      bmap, page caches, and b-tree node cache, and rolls back to the copy
      as needed.
      
      This enhancement is intended to displace gcdat inode that provides a
      similar function in a different way.
      
      In this patch, nilfs_shadow_map structure is added to store a copy of
      the foregoing states.  nilfs_mdt_setup_shadow_map relates this
      structure to a metadata file.  And, nilfs_mdt_save_to_shadow_map() and
      nilfs_mdt_restore_from_shadow_map() provides save and restore
      functions respectively.  Finally, nilfs_mdt_clear_shadow_map() clears
      states of nilfs_shadow_map.
      
      The copy of b-tree node cache and page cache is made by duplicating
      only dirty pages into corresponding caches in nilfs_shadow_map.  Their
      restoration is done by clearing dirty pages from original caches and
      by copying dirty pages back from nilfs_shadow_map.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      ebdfed4d
    • Ryusuke Konishi's avatar
      nilfs2: add routines to save and restore bmap state · a8070dd3
      Ryusuke Konishi authored
      This adds routines to save and restore the state of bmap structure.
      The bmap state is stored in a given nilfs_bmap_store object.
      
      These routines will be used to roll back the state of dat inode
      without using gcdat inode.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      a8070dd3
    • Ryusuke Konishi's avatar
      nilfs2: do not allocate nilfs_mdt_info structure to gc-inodes · adbb39b5
      Ryusuke Konishi authored
      GC-inode now doesn't need the nilfs_mdt_info structure and there is no
      reason that it is a sort of metadata files.
      
      This stops the allocation and makes them not dependent on metadata
      file routines.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      adbb39b5
    • Ryusuke Konishi's avatar
      nilfs2: allow nilfs_clear_inode to clear metadata file inodes · 518d1a6a
      Ryusuke Konishi authored
      Allows clear inode function (nilfs_clear_inode) to handle metadata
      files that uses bitmap-based object alloctor.  DAT and ifile
      correspond to this.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      518d1a6a
    • Ryusuke Konishi's avatar
      nilfs2: get rid of snapshot mount flag · b453c95e
      Ryusuke Konishi authored
      This flag is a fake used to distinguish type of super block instance.
      And, it got obsolete by the unification of sb.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      b453c95e
    • Ryusuke Konishi's avatar
      nilfs2: simplify life cycle management of nilfs object · 348fe8da
      Ryusuke Konishi authored
      This stops pre-allocating nilfs object in nilfs_get_sb routine, and
      stops managing its life cycle by reference counting.
      
      nilfs_find_or_create_nilfs() function, nilfs->ns_mount_mutex,
      nilfs_objects list, and the reference counter will be removed through
      the simplification.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      348fe8da
    • Ryusuke Konishi's avatar
      nilfs2: do not allocate multiple super block instances for a device · f11459ad
      Ryusuke Konishi authored
      This stops allocating multiple super block instances for a device.
      
      All snapshots and a current mode mount (i.e. latest tree) will be
      controlled with nilfs_root objects that are kept within an sb
      instance.
      
      nilfs_get_sb() is rewritten so that it always has a root object for
      the latest tree and snapshots make additional root objects.
      
      The root dentry of the latest tree is binded to sb->s_root even if it
      isn't attached on a directory.  Root dentries of snapshots or the
      latest tree are binded to mnt->mnt_root on which they are mounted.
      
      With this patch, nilfs_find_sbinfo() function, nilfs->ns_supers list,
      and nilfs->ns_current back pointer, are deleted.  In addition,
      init_nilfs() and load_nilfs() are simplified since they will be called
      once for a device, not repeatedly called for mount points.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      f11459ad
    • Ryusuke Konishi's avatar
      nilfs2: split out nilfs_attach_snapshot · ab4d8f7e
      Ryusuke Konishi authored
      This splits the code to attach snapshots into a separate routine for
      convenience sake.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      ab4d8f7e
    • Ryusuke Konishi's avatar
      nilfs2: split out nilfs_get_root_dentry · 367ea334
      Ryusuke Konishi authored
      This splits the code to allocate root dentry into a separate routine
      for convenience in successive changes.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      367ea334
    • Ryusuke Konishi's avatar
      nilfs2: deny write access to inodes in snapshots · dc3d3b81
      Ryusuke Konishi authored
      Snapshots of nilfs are read-only.
      
      After super block instances (sb) will be unified, nilfs will need to
      check write access by a way other than implicit test with
      IS_RDONLY(inode).  This is because IS_RDONLY() refers to MS_RDONLY bit
      of inode->i_sb->s_flags and it will become inaccurate after the
      unification of sb.
      
      To prepare for the issue, this uses i_op->permission to deny write
      access to inodes in snapshots.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      dc3d3b81
    • Ryusuke Konishi's avatar
      nilfs2: use checkpoint tree for mount check of snapshots · fd522029
      Ryusuke Konishi authored
      This rewrites nilfs_checkpoint_is_mounted() function so that it
      decides whether a checkpoint is mounted by whether the corresponding
      root object is found in checkpoint tree.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      fd522029
    • Ryusuke Konishi's avatar
      nilfs2: move inode count and block count into root object · b7c06342
      Ryusuke Konishi authored
      This moves sbi->s_inodes_count and sbi->s_blocks_count into nilfs_root
      object.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      b7c06342
    • Ryusuke Konishi's avatar
      nilfs2: use root object to get ifile · e912a5b6
      Ryusuke Konishi authored
      This rewrites functions using ifile so that they get ifile from
      nilfs_root object, and will remove sbi->s_ifile.  Some functions that
      don't know the root object are extended to receive it from caller.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      e912a5b6