queries providing write support to ufs2 in linux

rachana maniyar rachu_sm at yahoo.com
Sat Feb 25 03:40:31 PST 2006

Currently I am trying to give write support to the UFS2 file system in linux 2.6.10 which is a native file system for FreeBSD operating system.Right now the UFS2 has just read-only support in linux.
The current status is that i have been able to create the directories successfully in linux partition with UFS2 mounted on it without the freebsd partition getting corrupted. 
So whenever i try to open a file or write sm data into it,the process terminates out giving segmentation fault n this fault is sm divide by 0 error.
I have been able to trace out this error also,where does it come from.its the following macro which uses s_spc which has 0 value right at the time of file system getting registered.n hence the divide by 0 error occurs.
  /* linux-2.6.10/include/linux/ufs_fs.h */
  #define ufs_cbtocylno(bno) \
266 ((bno) * uspi->s_nspf / uspi->s_spc)
  so here the uspi->s_spc which is sectors per cylinder has value zero..
  Also one thing i noticed while tracing down all the parameters of the superblock and cylinder group is that most of them have zero values assigned right from the start when the file system is mounted on linux.
so wht can be done in regards to this problem?? 
  n the other thing it that while opening a file or writing data into a file wht care is to be taken or wht is the procedure??
  Well i would also like to know wht is the exact disk layout of the UFS2 file system..??
if anyone can give answers to the above questions ,it will be really helpful for me..
  thanking you in advance..


The only thing Constant is Change !!!
So try to be constant :-) \n\n",0] ); D(["ce"]);  //-->  

Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 

More information about the freebsd-questions mailing list