13 Aug, 2020

1 commit

  • Add macros for nilfs_(sb, fmt, ...) and convert the uses of
    'nilfs_msg(sb, KERN_, ...)' to 'nilfs_(sb, ...)' so nilfs2
    uses a logging style more like the typical kernel logging style.

    Miscellanea:

    o Realign arguments for these uses

    Signed-off-by: Joe Perches
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Link: http://lkml.kernel.org/r/1595860111-3920-4-git-send-email-konishi.ryusuke@gmail.com
    Signed-off-by: Linus Torvalds

    Joe Perches
     

23 Oct, 2019

1 commit


01 Jul, 2019

1 commit

  • Create a generic function to check incoming FS_IOC_SETFLAGS flag values
    and later prepare the inode for updates so that we can standardize the
    implementations that follow ext4's flag values.

    Note that the efivarfs implementation no longer fails a no-op SETFLAGS
    without CAP_LINUX_IMMUTABLE since that's the behavior in ext*.

    Signed-off-by: Darrick J. Wong
    Reviewed-by: Jan Kara
    Reviewed-by: Christoph Hellwig
    Acked-by: David Sterba
    Reviewed-by: Bob Peterson

    Darrick J. Wong
     

05 Sep, 2018

1 commit

  • Remove the verbose license text from NILFS2 files and replace them with
    SPDX tags. This does not change the license of any of the code.

    Link: http://lkml.kernel.org/r/1535624528-5982-1-git-send-email-konishi.ryusuke@lab.ntt.co.jp
    Signed-off-by: Ryusuke Konishi
    Reviewed-by: Andrew Morton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     

28 Sep, 2016

1 commit

  • CURRENT_TIME macro is not appropriate for filesystems as it
    doesn't use the right granularity for filesystem timestamps.
    Use current_time() instead.

    CURRENT_TIME is also not y2038 safe.

    This is also in preparation for the patch that transitions
    vfs timestamps to use 64 bit time and hence make them
    y2038 safe. As part of the effort current_time() will be
    extended to do range checks. Hence, it is necessary for all
    file system timestamps to use current_time(). Also,
    current_time() will be transitioned along with vfs to be
    y2038 safe.

    Note that whenever a single call to current_time() is used
    to change timestamps in different inodes, it is because they
    share the same time granularity.

    Signed-off-by: Deepa Dinamani
    Reviewed-by: Arnd Bergmann
    Acked-by: Felipe Balbi
    Acked-by: Steven Whitehouse
    Acked-by: Ryusuke Konishi
    Acked-by: David Sterba
    Signed-off-by: Al Viro

    Deepa Dinamani
     

03 Aug, 2016

2 commits

  • The header file "include/linux/nilfs2_fs.h" is composed of parts for
    ioctl and disk format, and both are intended to be shared with user
    space programs.

    This moves them to the uapi directory "include/uapi/linux" splitting the
    file to "nilfs2_api.h" and "nilfs2_ondisk.h". The following minor
    changes are accompanied by this migration:

    - nilfs_direct_node struct in nilfs2/direct.h is converged to
    nilfs2_ondisk.h because it's an on-disk structure.
    - inline functions nilfs_rec_len_from_disk() and
    nilfs_rec_len_to_disk() are moved to nilfs2/dir.c.

    Link: http://lkml.kernel.org/r/1465825507-3407-4-git-send-email-konishi.ryusuke@lab.ntt.co.jp
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • Replace most use of printk() in nilfs2 implementation with nilfs_msg(),
    and reduce the following checkpatch.pl warning:

    "WARNING: Prefer [subsystem eg: netdev]_crit([subsystem]dev, ...
    then dev_crit(dev, ... then pr_crit(... to printk(KERN_CRIT ..."

    This patch also fixes a minor checkpatch warning "WARNING: quoted string
    split across lines" that often accompanies the prior warning, and amends
    message format as needed.

    Link: http://lkml.kernel.org/r/1464875891-5443-5-git-send-email-konishi.ryusuke@lab.ntt.co.jp
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     

24 May, 2016

3 commits

  • nilfs_mdt_mark_block_dirty() can be replaced with primary functions
    like nilfs_mdt_get_block() and mark_buffer_dirty(), and it's used only
    by nilfs_ioctl_mark_blocks_dirty().

    This gets rid of the function to simplify the interface of metadata
    file.

    Link: http://lkml.kernel.org/r/1461935747-10380-8-git-send-email-konishi.ryusuke@lab.ntt.co.jp
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • E-mail addresses of osrg.net domain are no longer available. This
    removes them from authorship notices and prevents reporters from being
    confused.

    Link: http://lkml.kernel.org/r/1461935747-10380-5-git-send-email-konishi.ryusuke@lab.ntt.co.jp
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • This removes the extra paragraph which mentions FSF address in GPL
    notices from source code of nilfs2 and avoids the checkpatch.pl error
    related to it.

    Link: http://lkml.kernel.org/r/1461935747-10380-4-git-send-email-konishi.ryusuke@lab.ntt.co.jp
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     

23 Jan, 2016

1 commit

  • parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
    inode_foo(inode) being mutex_foo(&inode->i_mutex).

    Please, use those for access to ->i_mutex; over the coming cycle
    ->i_mutex will become rwsem, with ->lookup() done with it held
    only shared.

    Signed-off-by: Al Viro

    Al Viro
     

10 Jul, 2015

1 commit

  • The FITRIM ioctl has the same arguments on 32-bit and 64-bit
    architectures, so we can add it to the list of compatible ioctls and
    drop it from compat_ioctl method of various filesystems.

    Signed-off-by: Mikulas Patocka
    Cc: Al Viro
    Cc: Ted Ts'o
    Signed-off-by: Linus Torvalds

    Mikulas Patocka
     

14 Oct, 2014

1 commit

  • Under normal circumstances nilfs_sync_fs() writes out the super block,
    which causes a flush of the underlying block device. But this depends
    on the THE_NILFS_SB_DIRTY flag, which is only set if the pointer to the
    last segment crosses a segment boundary. So if only a small amount of
    data is written before the call to nilfs_sync_fs(), no flush of the
    block device occurs.

    In the above case an additional call to blkdev_issue_flush() is needed.
    To prevent unnecessary overhead, the new flag nilfs->ns_flushed_device
    is introduced, which is cleared whenever new logs are written and set
    whenever the block device is flushed. For convenience the function
    nilfs_flush_device() is added, which contains the above logic.

    Signed-off-by: Andreas Rohner
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Rohner
     

04 Apr, 2014

2 commits

  • Add support for the FITRIM ioctl, which enables user space tools to
    issue TRIM/DISCARD requests to the underlying device. Every clean
    segment within the specified range will be discarded.

    Signed-off-by: Andreas Rohner
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Rohner
     
  • With this ioctl the segment usage entries in the SUFILE can be updated
    from userspace.

    This is useful, because it allows the userspace GC to modify and update
    segment usage entries for specific segments, which enables it to avoid
    unnecessary write operations.

    If a segment needs to be cleaned, but there is no or very little
    reclaimable space in it, the cleaning operation basically degrades to a
    useless moving operation. In the end the only thing that changes is the
    location of the data and a timestamp in the segment usage information.
    With this ioctl the GC can skip the cleaning and update the segment
    usage entries directly instead.

    This is basically a shortcut to cleaning the segment. It is still
    necessary to read the segment summary information, but the writing of
    the live blocks can be skipped if it's not worth it.

    [konishi.ryusuke@lab.ntt.co.jp: add description of NILFS_IOCTL_SET_SUINFO ioctl]
    Signed-off-by: Andreas Rohner
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Rohner
     

24 Jan, 2014

2 commits

  • Add comments for ioctls in fs/nilfs2/ioctl.c file and describe NILFS2
    specific ioctls in Documentation/filesystems/nilfs2.txt.

    Signed-off-by: Vyacheslav Dubeyko
    Reviewed-by: Ryusuke Konishi
    Cc: Wenliang Fan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vyacheslav Dubeyko
     
  • The local variable 'pos' in nilfs_ioctl_wrap_copy function can overflow if
    a large number was passed to argv->v_index from userspace and the sum of
    argv->v_index and argv->v_nmembs exceeds the maximum value of __u64 type
    integer (= ~(__u64)0 = 18446744073709551615).

    Here, argv->v_index is a 64-bit width argument to specify the start
    position of target data items (such as segment number, checkpoint number,
    or virtual block address of nilfs), and argv->v_nmembs gives the total
    number of the items that userland programs (such as lssu, lscp, or
    cleanerd) want to get information about, which also gives the maximum
    element count of argv->v_base[] array.

    nilfs_ioctl_wrap_copy() calls dofunc() repeatedly and increments the
    position variable 'pos' at the end of each iteration if dofunc() itself
    didn't update 'pos':

    if (pos == ppos)
    pos += n;

    This patch prevents the overflow here by rejecting pairs of a start
    position (argv->v_index) and a total count (argv->v_nmembs) which leads to
    the overflow.

    [konishi.ryusuke@lab.ntt.co.jp: fix signedness issue]
    Signed-off-by: Wenliang Fan
    Cc: Vyacheslav Dubeyko
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wenliang Fan
     

27 Feb, 2013

1 commit

  • Pull vfs pile (part one) from Al Viro:
    "Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent
    locking violations, etc.

    The most visible changes here are death of FS_REVAL_DOT (replaced with
    "has ->d_weak_revalidate()") and a new helper getting from struct file
    to inode. Some bits of preparation to xattr method interface changes.

    Misc patches by various people sent this cycle *and* ocfs2 fixes from
    several cycles ago that should've been upstream right then.

    PS: the next vfs pile will be xattr stuff."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
    saner proc_get_inode() calling conventions
    proc: avoid extra pde_put() in proc_fill_super()
    fs: change return values from -EACCES to -EPERM
    fs/exec.c: make bprm_mm_init() static
    ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
    ocfs2: fix possible use-after-free with AIO
    ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
    get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero
    target: writev() on single-element vector is pointless
    export kernel_write(), convert open-coded instances
    fs: encode_fh: return FILEID_INVALID if invalid fid_type
    kill f_vfsmnt
    vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
    nfsd: handle vfs_getattr errors in acl protocol
    switch vfs_getattr() to struct path
    default SET_PERSONALITY() in linux/elf.h
    ceph: prepopulate inodes only when request is aborted
    d_hash_and_lookup(): export, switch open-coded instances
    9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate()
    9p: split dropping the acls from v9fs_set_create_acl()
    ...

    Linus Torvalds
     

23 Feb, 2013

1 commit


05 Feb, 2013

1 commit

  • There exists a situation when GC can work in background alone without
    any other filesystem activity during significant time.

    The nilfs_clean_segments() method calls nilfs_segctor_construct() that
    updates superblocks in the case of NILFS_SC_SUPER_ROOT and
    THE_NILFS_DISCONTINUED flags are set. But when GC is working alone the
    nilfs_clean_segments() is called with unset THE_NILFS_DISCONTINUED flag.
    As a result, the update of superblocks doesn't occurred all this time
    and in the case of SPOR superblocks keep very old values of last super
    root placement.

    SYMPTOMS:

    Trying to mount a NILFS2 volume after SPOR in such environment ends with
    very long mounting time (it can achieve about several hours in some
    cases).

    REPRODUCING PATH:

    1. It needs to use external USB HDD, disable automount and doesn't
    make any additional filesystem activity on the NILFS2 volume.

    2. Generate temporary file with size about 100 - 500 GB (for example,
    dd if=/dev/zero of= bs=1073741824 count=200). The size of
    file defines duration of GC working.

    3. Then it needs to delete file.

    4. Start GC manually by means of command "nilfs-clean -p 0". When you
    start GC by means of such way then, at the end, superblocks is updated
    by once. So, for simulation of SPOR, it needs to wait sometime (15 -
    40 minutes) and simply switch off USB HDD manually.

    5. Switch on USB HDD again and try to mount NILFS2 volume. As a
    result, NILFS2 volume will mount during very long time.

    REPRODUCIBILITY: 100%

    FIX:

    This patch adds checking that superblocks need to update and set
    THE_NILFS_DISCONTINUED flag before nilfs_clean_segments() call.

    Reported-by: Sergey Alexandrov
    Signed-off-by: Vyacheslav Dubeyko
    Tested-by: Vyacheslav Dubeyko
    Acked-by: Ryusuke Konishi
    Tested-by: Ryusuke Konishi
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vyacheslav Dubeyko
     

02 Aug, 2012

1 commit

  • Pull second vfs pile from Al Viro:
    "The stuff in there: fsfreeze deadlock fixes by Jan (essentially, the
    deadlock reproduced by xfstests 068), symlink and hardlink restriction
    patches, plus assorted cleanups and fixes.

    Note that another fsfreeze deadlock (emergency thaw one) is *not*
    dealt with - the series by Fernando conflicts a lot with Jan's, breaks
    userland ABI (FIFREEZE semantics gets changed) and trades the deadlock
    for massive vfsmount leak; this is going to be handled next cycle.
    There probably will be another pull request, but that stuff won't be
    in it."

    Fix up trivial conflicts due to unrelated changes next to each other in
    drivers/{staging/gdm72xx/usb_boot.c, usb/gadget/storage_common.c}

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (54 commits)
    delousing target_core_file a bit
    Documentation: Correct s_umount state for freeze_fs/unfreeze_fs
    fs: Remove old freezing mechanism
    ext2: Implement freezing
    btrfs: Convert to new freezing mechanism
    nilfs2: Convert to new freezing mechanism
    ntfs: Convert to new freezing mechanism
    fuse: Convert to new freezing mechanism
    gfs2: Convert to new freezing mechanism
    ocfs2: Convert to new freezing mechanism
    xfs: Convert to new freezing code
    ext4: Convert to new freezing mechanism
    fs: Protect write paths by sb_start_write - sb_end_write
    fs: Skip atime update on frozen filesystem
    fs: Add freezing handling to mnt_want_write() / mnt_drop_write()
    fs: Improve filesystem freezing handling
    switch the protection of percpu_counter list to spinlock
    nfsd: Push mnt_want_write() outside of i_mutex
    btrfs: Push mnt_want_write() outside of i_mutex
    fat: Push mnt_want_write() outside of i_mutex
    ...

    Linus Torvalds
     

31 Jul, 2012

2 commits

  • We change nilfs_page_mkwrite() to provide proper freeze protection for
    writeable page faults (we must wait for frozen filesystem even if the
    page is fully mapped).

    We remove all vfs_check_frozen() checks since they are now handled by
    the generic code.

    CC: linux-nilfs@vger.kernel.org
    CC: KONISHI Ryusuke
    Signed-off-by: Jan Kara
    Signed-off-by: Al Viro

    Jan Kara
     
  • An fs-thaw ioctl causes deadlock with a chcp or mkcp -s command:

    chcp D ffff88013870f3d0 0 1325 1324 0x00000004
    ...
    Call Trace:
    nilfs_transaction_begin+0x11c/0x1a0 [nilfs2]
    wake_up_bit+0x20/0x20
    copy_from_user+0x18/0x30 [nilfs2]
    nilfs_ioctl_change_cpmode+0x7d/0xcf [nilfs2]
    nilfs_ioctl+0x252/0x61a [nilfs2]
    do_page_fault+0x311/0x34c
    get_unmapped_area+0x132/0x14e
    do_vfs_ioctl+0x44b/0x490
    __set_task_blocked+0x5a/0x61
    vm_mmap_pgoff+0x76/0x87
    __set_current_blocked+0x30/0x4a
    sys_ioctl+0x4b/0x6f
    system_call_fastpath+0x16/0x1b
    thaw D ffff88013870d890 0 1352 1351 0x00000004
    ...
    Call Trace:
    rwsem_down_failed_common+0xdb/0x10f
    call_rwsem_down_write_failed+0x13/0x20
    down_write+0x25/0x27
    thaw_super+0x13/0x9e
    do_vfs_ioctl+0x1f5/0x490
    vm_mmap_pgoff+0x76/0x87
    sys_ioctl+0x4b/0x6f
    filp_close+0x64/0x6c
    system_call_fastpath+0x16/0x1b

    where the thaw ioctl deadlocked at thaw_super() when called while chcp was
    waiting at nilfs_transaction_begin() called from
    nilfs_ioctl_change_cpmode(). This deadlock is 100% reproducible.

    This is because nilfs_ioctl_change_cpmode() first locks sb->s_umount in
    read mode and then waits for unfreezing in nilfs_transaction_begin(),
    whereas thaw_super() locks sb->s_umount in write mode. The locking of
    sb->s_umount here was intended to make snapshot mounts and the downgrade
    of snapshots to checkpoints exclusive.

    This fixes the deadlock issue by replacing the sb->s_umount usage in
    nilfs_ioctl_change_cpmode() with a dedicated mutex which protects snapshot
    mounts.

    Signed-off-by: Ryusuke Konishi
    Cc: Fernando Luis Vazquez Cao
    Tested-by: Ryusuke Konishi
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     

01 Jun, 2012

1 commit

  • There are two cases that the cache flush is needed to avoid data loss
    against unexpected hang or power failure. One is sync file function (i.e.
    nilfs_sync_file) and another is checkpointing ioctl.

    This issues a cache flush request to device for such cases if barrier
    mount option is enabled, and makes sure data really is on persistent
    storage on their completion.

    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     

09 Feb, 2012

1 commit

  • nsegs is read from userspace. Limit its value and avoid overflowing nsegs
    * sizeof(__u64) in the subsequent call to memdup_user().

    This patch complements 481fe17e973fb9 ("nilfs2: potential integer overflow
    in nilfs_ioctl_clean_segments()").

    Signed-off-by: Xi Wang
    Cc: Haogang Chen
    Acked-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Xi Wang
     

04 Jan, 2012

2 commits


21 Dec, 2011

2 commits

  • There is a potential integer overflow in nilfs_ioctl_clean_segments().
    When a large argv[n].v_nmembs is passed from the userspace, the subsequent
    call to vmalloc() will allocate a buffer smaller than expected, which
    leads to out-of-bound access in nilfs_ioctl_move_blocks() and
    lfs_clean_segments().

    The following check does not prevent the overflow because nsegs is also
    controlled by the userspace and could be very large.

    if (argv[n].v_nmembs > nsegs * nilfs->ns_blocks_per_segment)
    goto out_free;

    This patch clamps argv[n].v_nmembs to UINT_MAX / argv[n].v_size, and
    returns -EINVAL when overflow.

    Signed-off-by: Haogang Chen
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haogang Chen
     
  • commit 828b1c50ae ("nilfs2: add compat ioctl") incidentally broke all
    other NILFS compat ioctls. Make them work again.

    Signed-off-by: Thomas Meyer
    Signed-off-by: Ryusuke Konishi
    Tested-by: Ryusuke Konishi
    Cc: [3.0+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Meyer
     

10 May, 2011

2 commits


24 Mar, 2011

1 commit


09 Mar, 2011

1 commit

  • This directly uses sb->s_fs_info to keep a nilfs filesystem object and
    fully removes the intermediate nilfs_sb_info structure. With this
    change, the hierarchy of on-memory structures of nilfs will be
    simplified as follows:

    Before:
    super_block
    -> nilfs_sb_info
    -> the_nilfs
    -> cptree --+-> nilfs_root (current file system)
    +-> nilfs_root (snapshot A)
    +-> nilfs_root (snapshot B)
    :
    -> nilfs_sc_info (log writer structure)
    After:
    super_block
    -> the_nilfs
    -> cptree --+-> nilfs_root (current file system)
    +-> nilfs_root (snapshot A)
    +-> nilfs_root (snapshot B)
    :
    -> nilfs_sc_info (log writer structure)

    The reason why we didn't design so from the beginning is because the
    initial shape also differed from the above. The early hierachy was
    composed of "per-mount-point" super_block -> nilfs_sb_info pairs and a
    shared nilfs object. On the kernel 2.6.37, it was changed to the
    current shape in order to unify super block instances into one per
    device, and this cleanup became applicable as the result.

    Signed-off-by: Ryusuke Konishi

    Ryusuke Konishi
     

08 Mar, 2011

3 commits

  • This is a similar change to those in ext2/ext3 codebase (commit
    40a063f6691ce937 and a4ae3094869f18e2, respectively).

    The addition of 64k block capability in the rec_len_from_disk and
    rec_len_to_disk functions added a bit of math overhead which slows
    down file create workloads needlessly when the architecture cannot
    even support 64k blocks. This will cut the corner.

    Signed-off-by: Ryusuke Konishi

    Ryusuke Konishi
     
  • The current FS_IOC_GETFLAGS/SETFLAGS/GETVERSION will fail if
    application is 32 bit and kernel is 64 bit.

    This issue is avoidable by adding compat_ioctl method.

    Signed-off-by: Ryusuke Konishi

    Ryusuke Konishi
     
  • Add support for the standard attributes set via chattr and read via
    lsattr. These attributes are already in the flags value in the nilfs2
    inode, but currently we don't have any ioctl commands that expose them
    to the userland.

    Collaterally, this adds the FS_IOC_GETVERSION ioctl for getting
    i_generation, which allows users to list the file's generation number
    with "lsattr -v".

    Signed-off-by: Ryusuke Konishi

    Ryusuke Konishi
     

10 Jan, 2011

1 commit

  • nilfs_dat_inode function was a wrapper to switch between normal dat
    inode and gcdat, a clone of the dat inode for garbage collection.

    This function got obsolete when the gcdat inode was removed, and now
    we can access the dat inode directly from a nilfs object. So, we will
    unfold the wrapper and remove it.

    Signed-off-by: Ryusuke Konishi

    Ryusuke Konishi
     

16 Dec, 2010

1 commit

  • On 2.6.37-rc1, garbage collection ioctl of nilfs was broken due to the
    commit 263d90cefc7d82a0 ("nilfs2: remove own inode hash used for GC"),
    and leading to filesystem corruption.

    The patch doesn't queue gc-inodes for log writer if they are reused
    through the vfs inode cache. Here, gc-inode is the inode which
    buffers blocks to be relocated on GC. That patch queues gc-inodes in
    nilfs_init_gcinode() function, but this function is not called when
    they don't have I_NEW flag. Thus, some of live blocks are wrongly
    overrode without being moved to new logs.

    This resolves the problem by moving the gc-inode queueing to an outer
    function to ensure it's done right.

    Signed-off-by: Ryusuke Konishi

    Ryusuke Konishi
     

23 Nov, 2010

1 commit


23 Oct, 2010

1 commit

  • 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: Ryusuke Konishi

    Ryusuke Konishi