public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* How do I clear the append-only flag on symlinks?
@ 2011-10-21 18:07 Andrew Lutomirski
  2011-10-22  5:16 ` Ted Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lutomirski @ 2011-10-21 18:07 UTC (permalink / raw)
  To: linux-ext4

By means that are best not admitted to, I managed to mark a large
chunk of my filesystem append-only, including symlinks.  I cleared the
flag from all the normal files and directories, but chattr and lsattr
don't want to operate on symlinks.  They say things like:

$ sudo lsattr /boot/vmlinuz
lsattr: Operation not supported While reading flags on /boot/vmlinuz

and I can't delete them, because

$ sudo rm /boot/vmlinuz
rm: cannot remove `/boot/vmlinuz': Operation not permitted

Any ideas on how to clear the append-only flags?  debug2fs is a little
scary, and hacking e2fsprogs to allow operation on symlinks seems to
affect symlink targets and not the symlinks themselves.

--Andy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How do I clear the append-only flag on symlinks?
  2011-10-21 18:07 How do I clear the append-only flag on symlinks? Andrew Lutomirski
@ 2011-10-22  5:16 ` Ted Ts'o
  2011-10-22  8:57   ` Andrew Lutomirski
  0 siblings, 1 reply; 3+ messages in thread
From: Ted Ts'o @ 2011-10-22  5:16 UTC (permalink / raw)
  To: Andrew Lutomirski; +Cc: linux-ext4

On Fri, Oct 21, 2011 at 11:07:51AM -0700, Andrew Lutomirski wrote:
> By means that are best not admitted to, I managed to mark a large
> chunk of my filesystem append-only, including symlinks.  I cleared the
> flag from all the normal files and directories, but chattr and lsattr
> don't want to operate on symlinks.

Yes.  So how did you set a whole chunk of your file system
append-only?

> Any ideas on how to clear the append-only flags?  debug2fs is a little
> scary, and hacking e2fsprogs to allow operation on symlinks seems to
> affect symlink targets and not the symlinks themselves.

I'd probably hack it into e2fsck, and let it offer to clear the
append-only flag on things that aren't regular files, on the theory
that they should have never been allowed to be set to begin with.

     	  	      	    	 	 - Ted

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How do I clear the append-only flag on symlinks?
  2011-10-22  5:16 ` Ted Ts'o
@ 2011-10-22  8:57   ` Andrew Lutomirski
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Lutomirski @ 2011-10-22  8:57 UTC (permalink / raw)
  To: Ted Ts'o; +Cc: linux-ext4

On Fri, Oct 21, 2011 at 10:16 PM, Ted Ts'o <tytso@mit.edu> wrote:
> On Fri, Oct 21, 2011 at 11:07:51AM -0700, Andrew Lutomirski wrote:
>> By means that are best not admitted to, I managed to mark a large
>> chunk of my filesystem append-only, including symlinks.  I cleared the
>> flag from all the normal files and directories, but chattr and lsattr
>> don't want to operate on symlinks.
>
> Yes.  So how did you set a whole chunk of your file system
> append-only?

I want to be able to write to shared, locked, writable mappings
without sleeping.  Updating file timestamps and stable pages get in
the way.  I was trying out an approach to fixing the file_update_call
in do_wp_page using a new inode flag.  Sadly, I figured out the hard
way that 8196 is not actually a power of two.  (My patch is also
garbage for other reasons, but I'll email out a different approach as
an RFC sometime soon.)

If you have any ideas for how to handle stable pages other than
carrying a patch to disable them, I'd love to hear it.  The obvious
approach of making a new writable copy of the page will involve
pagecache internals that I'm not at all familiar with.

>
>> Any ideas on how to clear the append-only flags?  debug2fs is a little
>> scary, and hacking e2fsprogs to allow operation on symlinks seems to
>> affect symlink targets and not the symlinks themselves.
>
> I'd probably hack it into e2fsck, and let it offer to clear the
> append-only flag on things that aren't regular files, on the theory
> that they should have never been allowed to be set to begin with.
>

I'll take a look on Monday.

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-22  8:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-21 18:07 How do I clear the append-only flag on symlinks? Andrew Lutomirski
2011-10-22  5:16 ` Ted Ts'o
2011-10-22  8:57   ` Andrew Lutomirski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox