* symlink has wrong sd_blocks count
@ 2003-02-18 10:53 Nick Burrett
2003-02-18 11:42 ` Oleg Drokin
0 siblings, 1 reply; 6+ messages in thread
From: Nick Burrett @ 2003-02-18 10:53 UTC (permalink / raw)
To: reiserfs-list
I'm running a stock 2.4.20 kernel with the reiserfs quota patches applied.
Simply creating a symlink and then running reiserfsck shows errors like
this:
/foofile 2 4 has wrong sd_blocks 8, has to be 1
I've reproduced this 100% on 100 filesystems on two servers.
bash-2.05# lvcreate -L 100M -n test vol01
lvcreate -- doing automatic backup of "vol01"
lvcreate -- logical volume "/dev/vol01/test" successfully created
bash-2.05# mkreiserfs /dev/vol01/test
<-------------mkreiserfs, 2002------------->
reiserfsprogs 3.6.2
mkreiserfs: Guessing about desired format..
mkreiserfs: Kernel 2.4.20 is running.
Format 3.6 with standard journal
Count of blocks on the device: 25600
Number of blocks consumed by mkreiserfs formatting process: 8212
Blocksize: 4096
Hash function used to sort names: "r5"
Journal Size 8193 blocks (first block 18)
Journal Max transaction length 1024
inode generation number: 0
UUID: cae72cae-5469-4e60-9b7f-7ffd662c3967
ATTENTION: YOU SHOULD REBOOT AFTER FDISK!
ALL DATA WILL BE LOST ON '/dev/vol01/test'!
Continue (y/n):y
Initializing journal - 0%....20%....40%....60%....80%....100%
Syncing..ok
[...snipped...]
bash-2.05# reiserfsck --check /dev/vol01/test
<-------------reiserfsck, 2002------------->
reiserfsprogs 3.6.2
Will read-only check consistency of the filesystem on /dev/vol01/test
Will put log info to 'stdout'
Do you want to run this program?[N/Yes] (note need to type Yes):Yes
###########
reiserfsck --check started at Tue Feb 18 10:47:22 2003
###########
Replaying journal..
No transactions found
Checking S+tree..ok
Comparing bitmaps..ok
Checking Semantic tree...
ok
No corruptions found
There are on the filesystem:
Leaves 1
Internal nodes 0
Directories 1
Other files 0
Data block pointers 0 (0 of them are zero)
Safe links 0
###########
reiserfsck finished at Tue Feb 18 10:47:22 2003
###########
bash-2.05# mount /dev/vol01/test /mnt
bash-2.05# cd /mnt
bash-2.05# touch bar
bash-2.05# ln -s bar foo
bash-2.05# cd /
bash-2.05# umount /mnt
bash-2.05# reiserfsck --check /dev/vol01/test
<-------------reiserfsck, 2002------------->
reiserfsprogs 3.6.2
Will read-only check consistency of the filesystem on /dev/vol01/test
Will put log info to 'stdout'
Do you want to run this program?[N/Yes] (note need to type Yes):Yes
###########
reiserfsck --check started at Tue Feb 18 10:48:04 2003
###########
Replaying journal..
No transactions found
Checking S+tree..ok
Comparing bitmaps..ok
Checking Semantic tree...
/foofile 2 4 has wrong sd_blocks 8, has to be 1
ok
There were found 1 corruptions which can be fixed with --fix-fixable
###########
reiserfsck finished at Tue Feb 18 10:48:04 2003
###########
bash-2.05#
--
Nick Burrett
Network Engineer, Designer Servers Ltd. http://www.dsvr.co.uk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: symlink has wrong sd_blocks count
2003-02-18 10:53 symlink has wrong sd_blocks count Nick Burrett
@ 2003-02-18 11:42 ` Oleg Drokin
2003-02-18 12:56 ` Chris Mason
0 siblings, 1 reply; 6+ messages in thread
From: Oleg Drokin @ 2003-02-18 11:42 UTC (permalink / raw)
To: Nick Burrett; +Cc: reiserfs-list
Hello!
On Tue, Feb 18, 2003 at 10:53:25AM +0000, Nick Burrett wrote:
> I'm running a stock 2.4.20 kernel with the reiserfs quota patches applied.
> Simply creating a symlink and then running reiserfsck shows errors like
> this:
> /foofile 2 4 has wrong sd_blocks 8, has to be 1
> I've reproduced this 100% on 100 filesystems on two servers.
Aha, I see.
Ignore this message for now for directories and symlinks.
This is because when reiserfs calculates number of blocks file would use,
in case of no quota, reiserfs code does this and can do this precisely
(up to 512 bytes), but with quota patches applied, quota code takes
account of blocks used. And it round everything up to blocksize, hence
the difference. And reiserfsck uses only 1st variant of the code.
I am not yet sure on how to deal with the issue.
Just ignore this message for now.
Bye,
Oleg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: symlink has wrong sd_blocks count
2003-02-18 11:42 ` Oleg Drokin
@ 2003-02-18 12:56 ` Chris Mason
2003-02-18 13:37 ` Oleg Drokin
0 siblings, 1 reply; 6+ messages in thread
From: Chris Mason @ 2003-02-18 12:56 UTC (permalink / raw)
To: Oleg Drokin; +Cc: Nick Burrett, reiserfs-list
On Tue, 2003-02-18 at 06:42, Oleg Drokin wrote:
> Hello!
>
> On Tue, Feb 18, 2003 at 10:53:25AM +0000, Nick Burrett wrote:
>
> > I'm running a stock 2.4.20 kernel with the reiserfs quota patches applied.
> > Simply creating a symlink and then running reiserfsck shows errors like
> > this:
> > /foofile 2 4 has wrong sd_blocks 8, has to be 1
> > I've reproduced this 100% on 100 filesystems on two servers.
>
> Aha, I see.
> Ignore this message for now for directories and symlinks.
> This is because when reiserfs calculates number of blocks file would use,
> in case of no quota, reiserfs code does this and can do this precisely
> (up to 512 bytes), but with quota patches applied, quota code takes
> account of blocks used. And it round everything up to blocksize, hence
> the difference. And reiserfsck uses only 1st variant of the code.
> I am not yet sure on how to deal with the issue.
> Just ignore this message for now.
The quota code can have special checks for symlinks, but the sd_block
accounting is somewhat complex, and I've been hesitant to make it even
more so with the symlink checks.
-chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: symlink has wrong sd_blocks count
2003-02-18 12:56 ` Chris Mason
@ 2003-02-18 13:37 ` Oleg Drokin
2003-02-18 13:41 ` Chris Mason
0 siblings, 1 reply; 6+ messages in thread
From: Oleg Drokin @ 2003-02-18 13:37 UTC (permalink / raw)
To: Chris Mason; +Cc: Nick Burrett, reiserfs-list
Hello!
On Tue, Feb 18, 2003 at 07:56:26AM -0500, Chris Mason wrote:
> > > I'm running a stock 2.4.20 kernel with the reiserfs quota patches applied.
> > > Simply creating a symlink and then running reiserfsck shows errors like
> > > this:
> > > /foofile 2 4 has wrong sd_blocks 8, has to be 1
> > > I've reproduced this 100% on 100 filesystems on two servers.
> > Aha, I see.
> > Ignore this message for now for directories and symlinks.
> > This is because when reiserfs calculates number of blocks file would use,
> > in case of no quota, reiserfs code does this and can do this precisely
> > (up to 512 bytes), but with quota patches applied, quota code takes
> > account of blocks used. And it round everything up to blocksize, hence
> > the difference. And reiserfsck uses only 1st variant of the code.
> > I am not yet sure on how to deal with the issue.
> > Just ignore this message for now.
> The quota code can have special checks for symlinks, but the sd_block
> accounting is somewhat complex, and I've been hesitant to make it even
> more so with the symlink checks.
Symlinks are counted the same way as directories.
If you round up directory size to 512 bytes, same can be done with symlinks.
But as I see it in quota (generic quota) code, the extra "i_bytes" are always
being rounded up to blocksize. And that what's causing a problem.
Bye,
Oleg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: symlink has wrong sd_blocks count
2003-02-18 13:37 ` Oleg Drokin
@ 2003-02-18 13:41 ` Chris Mason
2003-02-18 13:43 ` Oleg Drokin
0 siblings, 1 reply; 6+ messages in thread
From: Chris Mason @ 2003-02-18 13:41 UTC (permalink / raw)
To: Oleg Drokin; +Cc: Nick Burrett, reiserfs-list
On Tue, 2003-02-18 at 08:37, Oleg Drokin wrote:
> > The quota code can have special checks for symlinks, but the sd_block
> > accounting is somewhat complex, and I've been hesitant to make it even
> > more so with the symlink checks.
>
> Symlinks are counted the same way as directories.
> If you round up directory size to 512 bytes, same can be done with symlinks.
> But as I see it in quota (generic quota) code, the extra "i_bytes" are always
> being rounded up to blocksize. And that what's causing a problem.
Right, it should be possible. I'm just finishing testing on the latest
batch of quota code, so I'll work it in.
-chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: symlink has wrong sd_blocks count
2003-02-18 13:41 ` Chris Mason
@ 2003-02-18 13:43 ` Oleg Drokin
0 siblings, 0 replies; 6+ messages in thread
From: Oleg Drokin @ 2003-02-18 13:43 UTC (permalink / raw)
To: Chris Mason; +Cc: Nick Burrett, reiserfs-list
Hello!
On Tue, Feb 18, 2003 at 08:41:47AM -0500, Chris Mason wrote:
> > > The quota code can have special checks for symlinks, but the sd_block
> > > accounting is somewhat complex, and I've been hesitant to make it even
> > > more so with the symlink checks.
> > Symlinks are counted the same way as directories.
> > If you round up directory size to 512 bytes, same can be done with symlinks.
> > But as I see it in quota (generic quota) code, the extra "i_bytes" are always
> > being rounded up to blocksize. And that what's causing a problem.
> Right, it should be possible. I'm just finishing testing on the latest
> batch of quota code, so I'll work it in.
Ok, thank you.
Bye,
Oleg
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-02-18 13:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-18 10:53 symlink has wrong sd_blocks count Nick Burrett
2003-02-18 11:42 ` Oleg Drokin
2003-02-18 12:56 ` Chris Mason
2003-02-18 13:37 ` Oleg Drokin
2003-02-18 13:41 ` Chris Mason
2003-02-18 13:43 ` 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.