linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: linux-nilfs <linux-nilfs@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] nilfs2: move ioctl interface and disk layout to uapi separately
Date: Tue, 14 Jun 2016 15:29:52 -0700	[thread overview]
Message-ID: <20160614152952.05480c4a15aaf7973f302080@linux-foundation.org> (raw)
In-Reply-To: <1465825507-3407-4-git-send-email-konishi.ryusuke@lab.ntt.co.jp>

On Mon, 13 Jun 2016 22:45:07 +0900 Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> wrote:

> 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.
> 
> ...
>
> +static inline __le16 nilfs_rec_len_to_disk(unsigned int len)
> +{
> +#if (PAGE_SIZE >= 65536)
> +	if (len == (1 << 16))
> +		return cpu_to_le16(NILFS_MAX_REC_LEN);
> +
> +	BUG_ON(len > (1 << 16));

Is there any way in which the mount of a corrupted filesystem could
trigger this BUG?  If so, that would be bad.

> +#endif
> +	return cpu_to_le16(len);
> +}

  reply	other threads:[~2016-06-14 22:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13 13:45 [PATCH 0/3] nilfs2 additional updates Ryusuke Konishi
2016-06-13 13:45 ` [PATCH 1/3] nilfs2: fix misuse of a semaphore in sysfs code Ryusuke Konishi
2016-06-13 13:45 ` [PATCH 2/3] nilfs2: use BIT() macro Ryusuke Konishi
2016-06-13 13:45 ` [PATCH 3/3] nilfs2: move ioctl interface and disk layout to uapi separately Ryusuke Konishi
2016-06-14 22:29   ` Andrew Morton [this message]
2016-06-15 13:27     ` Ryusuke Konishi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160614152952.05480c4a15aaf7973f302080@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=konishi.ryusuke@lab.ntt.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nilfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).