diff options
author | Evgeniy Dushistov <dushistov@mail.ru> | 2010-03-10 18:21:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:35 -0500 |
commit | ad25ad979a309963e580015d57e4ec7da72bb7d4 (patch) | |
tree | 4e9210ba541eceae3c5e7779e498873557fc4130 /fs/ufs/ufs_fs.h | |
parent | b3a0fd4d877fe7692901b5867ba7cbd3f6d19d22 (diff) |
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: Evgeniy Dushistov <dushistov@mail.ru>
Reported-by: Alex Viskovatoff <viskovatoff@imap.cc>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ufs/ufs_fs.h')
-rw-r--r-- | fs/ufs/ufs_fs.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/ufs/ufs_fs.h b/fs/ufs/ufs_fs.h index eb9c0f2d19ec..6943ec677c0b 100644 --- a/fs/ufs/ufs_fs.h +++ b/fs/ufs/ufs_fs.h | |||
@@ -233,11 +233,16 @@ typedef __u16 __bitwise __fs16; | |||
233 | */ | 233 | */ |
234 | #define ufs_cbtocylno(bno) \ | 234 | #define ufs_cbtocylno(bno) \ |
235 | ((bno) * uspi->s_nspf / uspi->s_spc) | 235 | ((bno) * uspi->s_nspf / uspi->s_spc) |
236 | #define ufs_cbtorpos(bno) \ | 236 | #define ufs_cbtorpos(bno) \ |
237 | ((UFS_SB(sb)->s_flags & UFS_CG_SUN) ? \ | ||
238 | (((((bno) * uspi->s_nspf % uspi->s_spc) % \ | ||
239 | uspi->s_nsect) * \ | ||
240 | uspi->s_nrpos) / uspi->s_nsect) \ | ||
241 | : \ | ||
237 | ((((bno) * uspi->s_nspf % uspi->s_spc / uspi->s_nsect \ | 242 | ((((bno) * uspi->s_nspf % uspi->s_spc / uspi->s_nsect \ |
238 | * uspi->s_trackskew + (bno) * uspi->s_nspf % uspi->s_spc \ | 243 | * uspi->s_trackskew + (bno) * uspi->s_nspf % uspi->s_spc \ |
239 | % uspi->s_nsect * uspi->s_interleave) % uspi->s_nsect \ | 244 | % uspi->s_nsect * uspi->s_interleave) % uspi->s_nsect \ |
240 | * uspi->s_nrpos) / uspi->s_npsect) | 245 | * uspi->s_nrpos) / uspi->s_npsect)) |
241 | 246 | ||
242 | /* | 247 | /* |
243 | * The following macros optimize certain frequently calculated | 248 | * The following macros optimize certain frequently calculated |