All of lore.kernel.org
 help / color / mirror / Atom feed
* % of filesystem using tails/tail unpacking (shred related)
@ 2002-10-25 21:46 Brett Russ
  2002-10-28  9:55 ` Nikita Danilov
  0 siblings, 1 reply; 5+ messages in thread
From: Brett Russ @ 2002-10-25 21:46 UTC (permalink / raw)
  To: Reiserfs-List

Is there a way to analyze an existing ReiserFS and find out how many of the
blocks are tail packed as opposed to full/partially full from the same file?
This could lead to an impact study of converting it to an unpacked state.

From the information I have received so far, the only way shredding can
reliably work on Reiser, tail packing and data journaling need to be
disabled.  However, existing filesystems using tail packing can not be
simply unpacked to separate blocks without considering the following:

1) as mentioned first, an impact study should be done to determine if
unpacking will overflow the available space on the device

2) an unpack routine would need to be written if it doesn't exist.  With my
current knowledge of Reiser and my timeframe (3 weeks) this is not possible
for me to do IMO.

3) the unpack operation would need to treat the previously packed blocks as
sensitive by shredding them after all tails were relocated but before
returning the block to a free list

4) this operation, depending on the outcome of step 1, would be very
expensive in performance

That's all I can think of right now.  Does this sound accurate?

thanks,
brett



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

* Re: % of filesystem using tails/tail unpacking (shred related)
  2002-10-25 21:46 % of filesystem using tails/tail unpacking (shred related) Brett Russ
@ 2002-10-28  9:55 ` Nikita Danilov
  2002-10-28 21:20   ` Valdis.Kletnieks
  0 siblings, 1 reply; 5+ messages in thread
From: Nikita Danilov @ 2002-10-28  9:55 UTC (permalink / raw)
  To: Brett Russ; +Cc: Reiserfs-List

Brett Russ writes:
 > Is there a way to analyze an existing ReiserFS and find out how many of the
 > blocks are tail packed as opposed to full/partially full from the same file?
 > This could lead to an impact study of converting it to an unpacked state.
 > 
 > >From the information I have received so far, the only way shredding can
 > reliably work on Reiser, tail packing and data journaling need to be
 > disabled.  However, existing filesystems using tail packing can not be
 > simply unpacked to separate blocks without considering the following:
 > 
 > 1) as mentioned first, an impact study should be done to determine if
 > unpacking will overflow the available space on the device

Why cannot you do unpacking just before shredding particular file?

 > 
 > 2) an unpack routine would need to be written if it doesn't exist.  With my
 > current knowledge of Reiser and my timeframe (3 weeks) this is not possible
 > for me to do IMO.

Unpacking can be done through REISERFS_IOC_UNPACK ioctl (see
fs/reiserfs/ioctl.c). One should keep file descriptor open across
ioctl() and shredding for this to work reliably.

 > 
 > 3) the unpack operation would need to treat the previously packed blocks as
 > sensitive by shredding them after all tails were relocated but before
 > returning the block to a free list

ioctl doesn't do this.

 > 
 > 4) this operation, depending on the outcome of step 1, would be very
 > expensive in performance
 > 
 > That's all I can think of right now.  Does this sound accurate?
 > 
 > thanks,
 > brett
 > 

Nikita.

 > 

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

* Re: % of filesystem using tails/tail unpacking (shred related)
  2002-10-28  9:55 ` Nikita Danilov
@ 2002-10-28 21:20   ` Valdis.Kletnieks
  2002-10-28 22:38     ` Brett Russ
  0 siblings, 1 reply; 5+ messages in thread
From: Valdis.Kletnieks @ 2002-10-28 21:20 UTC (permalink / raw)
  To: Nikita Danilov; +Cc: Reiserfs-List

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

On Mon, 28 Oct 2002 12:55:20 +0300, Nikita Danilov said:
> Brett Russ writes:

>  > 1) as mentioned first, an impact study should be done to determine if
>  > unpacking will overflow the available space on the device
> 
> Why cannot you do unpacking just before shredding particular file?

Unpacking before shredding has a subtle hole in it - since you will unpack
into *different* disk blocks and then shred *those* blocks, you will be
leaving unshredded data in the blocks the file occupied before unpacking.
-- 
				Valdis Kletnieks
				Computer Systems Senior Engineer
				Virginia Tech


[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

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

* Re: % of filesystem using tails/tail unpacking (shred related)
  2002-10-28 21:20   ` Valdis.Kletnieks
@ 2002-10-28 22:38     ` Brett Russ
  2002-10-29  6:10       ` Oleg Drokin
  0 siblings, 1 reply; 5+ messages in thread
From: Brett Russ @ 2002-10-28 22:38 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: Nikita Danilov, Reiserfs-List

Valdis.Kletnieks@vt.edu wrote:
> On Mon, 28 Oct 2002 12:55:20 +0300, Nikita Danilov said:
> 
>>Brett Russ writes:
> 
> 
>> > 1) as mentioned first, an impact study should be done to determine if
>> > unpacking will overflow the available space on the device
>>
>>Why cannot you do unpacking just before shredding particular file?
> 
> 
> Unpacking before shredding has a subtle hole in it - since you will unpack
> into *different* disk blocks and then shred *those* blocks, you will be
> leaving unshredded data in the blocks the file occupied before unpacking.

Exactly, that was item #3 on my list.  So given what has been said thus 
far, the following seems to be true:

a) shred will work reliably on all new files created on a filesystem 
mounted with tail packing disabled

b) to deal with filesystems already tail packed, shredding knowledge 
would need to be added to the unpack ioctl BUT there is no way to 
determine where else the tails have lived on disk prior to any rebalancing.

Which leads to:

c) there is no reliable way to shred anything that has been tail packed.

Please affirm or correct my conclusions, and thank you all for your help 
thus far.

-Brett


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

* Re: % of filesystem using tails/tail unpacking (shred related)
  2002-10-28 22:38     ` Brett Russ
@ 2002-10-29  6:10       ` Oleg Drokin
  0 siblings, 0 replies; 5+ messages in thread
From: Oleg Drokin @ 2002-10-29  6:10 UTC (permalink / raw)
  To: Brett Russ; +Cc: Valdis.Kletnieks, Nikita Danilov, Reiserfs-List

Hello!

On Mon, Oct 28, 2002 at 05:38:57PM -0500, Brett Russ wrote:
> a) shred will work reliably on all new files created on a filesystem 
> mounted with tail packing disabled

Yes. Also in reiserfs case (2.4 kernel in current state) tail is packed
on close, if file created was bigger than 16K (with newe cod it is 
switchable and can be also 4K), tail is never packed for such a file.
Actually the rule is more complex than that, see reiserfs_fs.h,
STORE_TAIL_IN_UNFM

> b) to deal with filesystems already tail packed, shredding knowledge 
> would need to be added to the unpack ioctl BUT there is no way to 
> determine where else the tails have lived on disk prior to any rebalancing.

True. If ever there were any tails at all.
Same stuff applies to a case where file was read into memory,
modified a little bit and then written back to disk, truncating or
removing original file first. On any fs. Lots of editors behave like this
and thus making shred not very effecrive.

> Which leads to:
> c) there is no reliable way to shred anything that has been tail packed.

True. But on reiserfs there certain kind of files (i.e. longer than 16K)
that are never packed.
Also with introduction of data journaling, in data journaling mode the data
removed still will be in journal for some time.

Bye,
    Oleg

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

end of thread, other threads:[~2002-10-29  6:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-25 21:46 % of filesystem using tails/tail unpacking (shred related) Brett Russ
2002-10-28  9:55 ` Nikita Danilov
2002-10-28 21:20   ` Valdis.Kletnieks
2002-10-28 22:38     ` Brett Russ
2002-10-29  6:10       ` Oleg Drokin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.