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
     

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
     

03 Aug, 2016

1 commit

  • 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

  • This fixes checkpatch.pl warning "WARNING: Prefer 'unsigned int' to
    bare use of 'unsigned'".

    Link: http://lkml.kernel.org/r/1462886671-3521-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
     
  • 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
     

07 Nov, 2015

1 commit

  • Fix the following build warnings:

    $ make W=1
    [...]
    CC [M] fs/nilfs2/btree.o
    fs/nilfs2/btree.c: In function 'nilfs_btree_split':
    fs/nilfs2/btree.c:923:8: warning: variable 'newptr' set but not used [-Wunused-but-set-variable]
    __u64 newptr;
    ^
    fs/nilfs2/btree.c:922:8: warning: variable 'newkey' set but not used [-Wunused-but-set-variable]
    __u64 newkey;
    ^
    CC [M] fs/nilfs2/dat.o
    fs/nilfs2/dat.c: In function 'nilfs_dat_prepare_end':
    fs/nilfs2/dat.c:158:8: warning: variable 'start' set but not used [-Wunused-but-set-variable]
    __u64 start;
    ^
    CC [M] fs/nilfs2/segment.o
    fs/nilfs2/segment.c: In function 'nilfs_segctor_do_immediate_flush':
    fs/nilfs2/segment.c:2433:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]
    int err;
    ^
    CC [M] fs/nilfs2/sufile.o
    fs/nilfs2/sufile.c: In function 'nilfs_sufile_alloc':
    fs/nilfs2/sufile.c:320:27: warning: variable 'ncleansegs' set but not used [-Wunused-but-set-variable]
    unsigned long nsegments, ncleansegs, nsus, cnt;
    ^
    CC [M] fs/nilfs2/alloc.o
    fs/nilfs2/alloc.c: In function 'nilfs_palloc_prepare_alloc_entry':
    fs/nilfs2/alloc.c:478:38: warning: variable 'groups_per_desc_block' set but not used [-Wunused-but-set-variable]
    unsigned long n, entries_per_group, groups_per_desc_block;
    ^

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

    Ryusuke Konishi
     

04 Apr, 2014

1 commit

  • Add code to check sizes of on-disk data of metadata files such as inode
    size, segment usage size, DAT entry size, and checkpoint size. Although
    these sizes are read from disk, the current implementation doesn't check
    them.

    If these sizes are not sane on disk, it can cause out-of-range access to
    metadata or memory access overrun on metadata block buffers due to
    overflow in sundry calculations.

    Both lower limit and upper limit of metadata sizes are verified to
    prevent these issues.

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

    Ryusuke Konishi
     

31 Jul, 2012

1 commit


20 Mar, 2012

1 commit


10 May, 2011

1 commit


24 Nov, 2010

1 commit


23 Oct, 2010

3 commits


14 Mar, 2010

1 commit


13 Feb, 2010

1 commit

  • This is a trivial patch to delete unnecessary condition in nilfs_dat_translate.

    nilfs_dat_translate() will asign translated address to *blocknrp if blocknrp
    is not NULL. However the condition is unneeded, because all callers of
    nilfs_dat_translate() pass blocknrp properly.

    Signed-off-by: Jiro SEKIBA
    Signed-off-by: Ryusuke Konishi

    Jiro SEKIBA
     

20 Nov, 2009

3 commits


14 Sep, 2009

2 commits


05 Jul, 2009

1 commit

  • In case of write-failure retries, the following KERN_CRIT level
    messages are mistakenly output by nilfs_dat_commit_start() function:

    nilfs_dat_commit_start: vbn = 408463, start = 12506, end = 18446744073709551615, pbn = 530210
    nilfs_dat_commit_start: vbn = 408515, start = 12506, end = 18446744073709551615, pbn = 530211
    nilfs_dat_commit_start: vbn = 408464, start = 12506, end = 18446744073709551615, pbn = 530212
    ...

    This suppresses these messages.

    Signed-off-by: Ryusuke Konishi
    Cc: stable@kernel.org

    Ryusuke Konishi
     

10 Jun, 2009

2 commits

  • Nilfs has some ioctl commands to read out metadata from meta data
    files:

    - NILFS_IOCTL_GET_CPINFO for checkpoint file,
    - NILFS_IOCTL_GET_SUINFO for segment usage file, and
    - NILFS_IOCTL_GET_VINFO for Disk Address Transalation (DAT) file,
    respectively.

    Every routine on these metadata files is implemented so that it allows
    future expansion of on-disk format. But, the above ioctl commands do
    not support expansion even though nilfs_argv structure can handle
    arbitrary size for data exchanged via ioctl.

    This allows future expansion of the following structures which give
    basic format of the "get information" ioctls:

    - struct nilfs_cpinfo
    - struct nilfs_suinfo
    - struct nilfs_vinfo

    So, this introduces forward compatility of such ioctl commands.

    In this patch, a sanity check in nilfs_ioctl_get_info() function is
    changed to accept larger data structure [1], and metadata read
    routines are rewritten so that they become compatible for larger
    structures; the routines will just ignore the remaining fields which
    the current version of nilfs doesn't know.

    [1] The ioctl function already has another upper limit (PAGE_SIZE
    against a structure, which appears in nilfs_ioctl_wrap_copy
    function), and this will not cause security problem.

    Signed-off-by: Ryusuke Konishi

    Ryusuke Konishi
     
  • This function is unused.

    Signed-off-by: Ryusuke Konishi

    Ryusuke Konishi
     

07 Apr, 2009

2 commits

  • Pekka Enberg advised me:
    > It would be nice if BUG(), BUG_ON(), and panic() calls would be
    > converted to proper error handling using WARN_ON() calls. The BUG()
    > call in nilfs_cpfile_delete_checkpoints(), for example, looks to be
    > triggerable from user-space via the ioctl() system call.

    This will follow the comment and keep them to a minimum.

    Acked-by: Pekka Enberg
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • This adds the disk address translation file (DAT) whose primary function
    is to convert virtual disk block numbers to actual disk block numbers.

    The virtual block numbers of NILFS are associated with checkpoint
    generation numbers, and this file also provides functions to manage the
    lifetime information of each virtual block number.

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

    Koji Sato