Commit ad25ad97 authored by Evgeniy Dushistov's avatar Evgeniy Dushistov Committed by Linus Torvalds

ufs: make solaris fsck happy

Alex Viskovatoff let me know that after copying data to solaris's ufs from
linux, solaris's fsck sees some errors in cylinder summary information.
This is because of solaris expects find some data on another places, then
curernt implementation save it.  This patch fixes this issue.  It is
tested by me, and also Alex reported that it works for him.
Signed-off-by: default avatarEvgeniy Dushistov <dushistov@mail.ru>
Reported-by: default avatarAlex Viskovatoff <viskovatoff@imap.cc>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b3a0fd4d
......@@ -234,10 +234,15 @@ typedef __u16 __bitwise __fs16;
#define ufs_cbtocylno(bno) \
((bno) * uspi->s_nspf / uspi->s_spc)
#define ufs_cbtorpos(bno) \
((UFS_SB(sb)->s_flags & UFS_CG_SUN) ? \
(((((bno) * uspi->s_nspf % uspi->s_spc) % \
uspi->s_nsect) * \
uspi->s_nrpos) / uspi->s_nsect) \
: \
((((bno) * uspi->s_nspf % uspi->s_spc / uspi->s_nsect \
* uspi->s_trackskew + (bno) * uspi->s_nspf % uspi->s_spc \
% uspi->s_nsect * uspi->s_interleave) % uspi->s_nsect \
* uspi->s_nrpos) / uspi->s_npsect)
* uspi->s_nrpos) / uspi->s_npsect))
/*
* The following macros optimize certain frequently calculated
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment