public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Steven <stevenaaus@yahoo.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH]: ufs: fix symlink creation on ufs2
Date: Wed, 9 Jan 2008 23:51:48 -0800	[thread overview]
Message-ID: <20080109235148.d5896897.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080102204649.GA16373@rain>

On Wed, 2 Jan 2008 23:47:04 +0300 Evgeniy Dushistov <dushistov@mail.ru> wrote:

> If create symlink on UFS2 filesystem under Linux,
> it looks wrong under other OSes, because of max symlink length
> field was not initialized properly, and data blocks were not
> used to save short symlink names.
> 
> Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
> Cc: Steven <stevenaaus@yahoo.com>
> 
> ---
> 
> diff --git a/fs/ufs/super.c b/fs/ufs/super.c
> index 0072cb3..14605c0 100644
> --- a/fs/ufs/super.c
> +++ b/fs/ufs/super.c
> @@ -131,6 +131,8 @@ static void ufs_print_super_stuff(struct super_block *sb,
>  		printk(KERN_INFO"  cs_nffree(Num of free frags): %llu\n",
>  		       (unsigned long long)
>  		       fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nffree));
> +		printk(KERN_INFO"  fs_maxsymlinklen: %u\n",
> +		       usb3->fs_un2.fs_44.fs_maxsymlinklen);

I assume this needs conversion via fs32_to_cpu() before we print it.

>  	} else {
>  		printk(" sblkno:      %u\n", fs32_to_cpu(sb, usb1->fs_sblkno));
>  		printk(" cblkno:      %u\n", fs32_to_cpu(sb, usb1->fs_cblkno));
> @@ -1060,8 +1062,8 @@ magic_found:
>  	uspi->s_bpf = uspi->s_fsize << 3;
>  	uspi->s_bpfshift = uspi->s_fshift + 3;
>  	uspi->s_bpfmask = uspi->s_bpf - 1;
> -	if ((sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) ==
> -	    UFS_MOUNT_UFSTYPE_44BSD)
> +	if ((sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) == UFS_MOUNT_UFSTYPE_44BSD ||
> +	    (sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) == UFS_MOUNT_UFSTYPE_UFS2)
>  		uspi->s_maxsymlinklen =
>  		    fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen);
>  


  reply	other threads:[~2008-01-10  7:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-02 20:47 [PATCH]: ufs: fix symlink creation on ufs2 Evgeniy Dushistov
2008-01-10  7:51 ` Andrew Morton [this message]
2008-01-10  8:40   ` Christoph Hellwig
2008-01-10  8:44     ` Al Viro

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=20080109235148.d5896897.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dushistov@mail.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stevenaaus@yahoo.com \
    /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