mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Drokin <green@linuxhacker.ru>
To: linux-kernel@vger.kernel.org, bart@samwel.tk, nikita@namesys.com
Subject: Re: Reiserfs flags question
Date: Sun, 8 Feb 2004 19:57:34 +0200	[thread overview]
Message-ID: <200402081757.i18HvYV2074606@car.linuxhacker.ru> (raw)
In-Reply-To: <401D3E97.5080902@samwel.tk>

Hello!

Bart Samwel <bart@samwel.tk> wrote:

BS> I was looking at fs/reiserfs/inode.c, and I noticed that the functions 
BS> sd_attrs_to_i_attrs and i_attrs_to_sd_attrs are not exact inverses: 
BS> i_attrs_to_sd_attrs doesn't convert the S_APPEND flag to 
BS> REISERFS_APPEND_FL, but sd_attrs_to_i_attrs does convert 
BS> REISERFS_APPEND_FL to S_APPEND. I was wondering, is this intentional?

Indeed this is a mistake.
Everything was still working as expected because i_attrs_to_sd_attrs cannot
change anything these days, since the only way to change inode attributes is
through special ioctl, that directly assigns passed flags value to i_attrs
field of reiserfs specific part of inode.

For the sakr of correctness and also in case there would be another path
to change file attrubutes besides the ioctl, this patch below is needed
for both 2.4 and 2.6
Thank you very much.

Bye,
    Oleg

===== fs/reiserfs/inode.c 1.87 vs edited =====
--- 1.87/fs/reiserfs/inode.c	Mon Jan 19 08:22:24 2004
+++ edited/fs/reiserfs/inode.c	Sun Feb  8 19:41:43 2004
@@ -2317,6 +2317,11 @@
 			*sd_attrs |= REISERFS_IMMUTABLE_FL;
 		else
 			*sd_attrs &= ~REISERFS_IMMUTABLE_FL;
+		if( inode -> i_flags & S_APPEND )
+			*sd_attrs |= REISERFS_APPEND_FL;
+		else
+			*sd_attrs &= ~REISERFS_APPEND_FL;
+
 		if( inode -> i_flags & S_SYNC )
 			*sd_attrs |= REISERFS_SYNC_FL;
 		else


      reply	other threads:[~2004-02-08 17:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-01 17:59 Bart Samwel
2004-02-08 17:57 ` Oleg Drokin [this message]

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=200402081757.i18HvYV2074606@car.linuxhacker.ru \
    --to=green@linuxhacker.ru \
    --cc=bart@samwel.tk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikita@namesys.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

Powered by JetHome