1. 24 Oct, 2010 1 commit
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 188e213d
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: Makefile - replace the use of <module>-objs with <module>-y
        crypto: hifn_795x - use cancel_delayed_work_sync()
        crypto: talitos - sparse check endian fixes
        crypto: talitos - fix checkpatch warning
        crypto: talitos - fix warning: 'alg' may be used uninitialized in this function
        crypto: cryptd - Adding the AEAD interface type support to cryptd
        crypto: n2_crypto - Niagara2 driver needs to depend upon CRYPTO_DES
        crypto: Kconfig - update broken web addresses
        crypto: omap-sham - Adjust DMA parameters
        crypto: fips - FIPS requires algorithm self-tests
        crypto: omap-aes - OMAP2/3 AES hw accelerator driver
        crypto: updates to enable omap aes
        padata: add missing __percpu markup in include/linux/padata.h
        MAINTAINERS: Add maintainer entries for padata/pcrypt
      188e213d
  2. 23 Oct, 2010 39 commits
    • Linus Torvalds's avatar
      Merge branch 'for-2.6.37/core' of git://git.kernel.dk/linux-2.6-block · 35da7a30
      Linus Torvalds authored
      * 'for-2.6.37/core' of git://git.kernel.dk/linux-2.6-block:
        block: fix use-after-free bug in blk throttle code
      35da7a30
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 · 5f05647d
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits)
        bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
        vlan: Calling vlan_hwaccel_do_receive() is always valid.
        tproxy: use the interface primary IP address as a default value for --on-ip
        tproxy: added IPv6 support to the socket match
        cxgb3: function namespace cleanup
        tproxy: added IPv6 support to the TPROXY target
        tproxy: added IPv6 socket lookup function to nf_tproxy_core
        be2net: Changes to use only priority codes allowed by f/w
        tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
        tproxy: added tproxy sockopt interface in the IPV6 layer
        tproxy: added udp6_lib_lookup function
        tproxy: added const specifiers to udp lookup functions
        tproxy: split off ipv6 defragmentation to a separate module
        l2tp: small cleanup
        nf_nat: restrict ICMP translation for embedded header
        can: mcp251x: fix generation of error frames
        can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set
        can-raw: add msg_flags to distinguish local traffic
        9p: client code cleanup
        rds: make local functions/variables static
        ...
      
      Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and
      drivers/net/wireless/ath/ath9k/debug.c as per David
      5f05647d
    • Jens Axboe's avatar
      block: fix use-after-free bug in blk throttle code · 7ad58c02
      Jens Axboe authored
      blk_throtl_exit() frees the throttle data hanging off the queue
      in blk_cleanup_queue(), but blk_put_queue() will indirectly
      dereference this data when calling blk_sync_queue() which in
      turns calls throtl_shutdown_timer_wq().
      
      Fix this by moving the freeing of the throttle data to when
      the queue is truly being released, and post the call to
      blk_sync_queue().
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Tested-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      7ad58c02
    • Linus Torvalds's avatar
      Merge branches 'softirq-for-linus', 'x86-debug-for-linus',... · 02f36038
      Linus Torvalds authored
      Merge branches 'softirq-for-linus', 'x86-debug-for-linus', 'x86-numa-for-linus', 'x86-quirks-for-linus', 'x86-setup-for-linus', 'x86-uv-for-linus' and 'x86-vm86-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'softirq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        softirqs: Make wakeup_softirqd static
      
      * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86, asm: Restore parentheses around one pushl_cfi argument
        x86, asm: Fix ancient-GAS workaround
        x86, asm: Fix CFI macro invocations to deal with shortcomings in gas
      
      * 'x86-numa-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86, numa: Assign CPUs to nodes in round-robin manner on fake NUMA
      
      * 'x86-quirks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86: HPET force enable for CX700 / VIA Epia LT
      
      * 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86, setup: Use string copy operation to optimze copy in kernel compression
      
      * 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86, UV: Use allocated buffer in tlb_uv.c:tunables_read()
      
      * 'x86-vm86-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86, vm86: Fix preemption bug for int1 debug and int3 breakpoint handlers.
      02f36038
    • Linus Torvalds's avatar
      Revert "tty: Add a new file /proc/tty/consoles" · 6c2754c2
      Linus Torvalds authored
      This reverts commit f4a3e0bc.  Jiri
      Sladby points out that the tty structure we're using may already be
      gone, and Al Viro doesn't hold back in complaining about the random
      loading of 'filp->private_data' which doesn't have to be a pointer at
      all, nor does checking the magic field for TTY_MAGIC prove anything.
      
      Belated review by Al:
      
       "a) global variable depending on stdin of the last opener? Affecting
           output of read(2)? Really?
      
        b) iterator is broken; list should be locked in ->start(), unlocked in
           ->stop() and *NOT* unlocked/relocked in ->next()
      
        c) ->show() ought to do nothing in case of ->device == NULL, instead
           of skipping those in ->next()/->start()
      
        d) regardless of the merits of the bright idea about asterisk at that
           line in output *and* regardless of (a), the implementation is not
           only atrociously ugly, it's actually very likely to be a roothole.
           Verifying that Cthulhu knows what number happens to be address of a
           tty_struct by blindly dereferencing memory at that address...
           Ouch.
      
        Please revert that crap."
      
      And Christoph pipes in and NAK's the approach of walking fd tables etc
      too.  So it's pretty unanimous.
      Noticed-by: default avatarJri Slaby <jslaby@suse.cz>
      Requested-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Werner Fink <werner@suse.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6c2754c2
    • 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