Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Sun Sep 04, 2011 3:52 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 55 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Sat Feb 28, 2009 8:56 pm 
Offline
Newbie

Joined: Tue Aug 19, 2008 9:18 am
Posts: 32
hi,

I have uploaded some patches against orion git and a setup routine for the
Philips spd8020 cc NAS device based on a 88f6082 Marvell SoC in the User section:

http://downloads.buffalo.nas-central.org/Users/pbg4/

so in fact it is now possible to have a new kernel and debian armel on devices
like the LS-LGL, Lacie Network Space and others,... there are only marginal differences
on these devices, like another I2C rtc adress, leds stuff,...

Thanks to Lennert in linkstationwiki irc who has supported this a lot, the biggest problem was getting
Sata working, but that is OK now,

From the README there:

These are experimental patches for the Philips SPD8020_CC NAS
device together with a setup routine for that device which is
based on the 88f6082 SOC.

As this is a very early development version of the kernel it may cause damage to
your SPD8020CC. Only use this if you know what you are doing and
do not care about the data on your device.

This is a set of patches against the Orion Git repository
(see http://git.marvell.com/?p=orion.git;a=summary ).

spd8020cc.patch - Changes the defconfig, Kconfig and Makefile for SPD8020_CC
orion5x.h_new.patch - Introduces the MV88F6082 Dev ID and Revision and new Base Addresses for SATA and XOR
mach-types.patch - Faked Mach-ID entry 2007 = 0x07d7 for SPD8020_CC (obsolete once the device is registered)
common.c.patch - Fixes tclk 133 mhz support for 88f6082
spd8020_cc-setup.c - Setup routine for SPD8020_CC
config - The kernel .config used to compile
uImage - Binary kernel with above patches, config and devio > foo 'wl 0xe3a01c07,4' 'wl 0xe38110d7,4' patch for the above faked mach-id of the device

As this is the first time the Marvell 88f6082 SOC is supported
in Orion git there are still some restrictions as this is still
work in progress:

- the mach-id is not registered yet
- the buttons are not yet supported
- the shutdown via arch_reset is not yet coded, .....

Beware that the internal register map of 88f6082 is different
from the well known 88f5182 and 88f5181 SOC. The Sata Base address
is 0x60000 and not 0x80000 !!

Have fun testing, pbg4

_________________
LS GL pro with debootstrapped debian armel sid as dvb-s streaming server
nslu2 now with debian armel(!) sid as dvb-s streaming server
Philips SPD8020 kernel recompiled plus stock firmware and optware feed as fileserver/UPNP/NFS server


Top
 Profile  
 
PostPosted: Tue Mar 03, 2009 12:40 am 
Offline
Regular Member

Joined: Tue Sep 09, 2008 10:28 pm
Posts: 199
Hi pbg4

great work, for sure I will test it.
Only need to find some free time...


Top
 Profile  
 
PostPosted: Tue Mar 03, 2009 1:58 am 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
This is really nice work that you all are doing here. All of you working in the "LS-LGL Clone from Philips" thread, you've done a nice job of putting the pieces of the puzzle together.

The kernel work that you all and lennert have done is very nice, too.

:)

This makes the future more accessible to us ... I guess I need to eventually get something that has the 6082 in it...

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on foonas and a LSPro armel image

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
 Profile  
 
PostPosted: Tue Mar 03, 2009 10:11 am 
Offline
Site Admin
User avatar

Joined: Mon Jul 11, 2005 7:19 am
Posts: 7702
Location: Austria, Vienna
mach-id -> http://www.arm.linux.org.uk/developer/machines/

_________________
LS1 (2.6 kernel, foonas svn1062, 750 GB, UBoot 1.2) & LS Pro (FreeLink/jtymod/GenLink, changes all the time)
Thx to all donators!


Top
 Profile  
 
PostPosted: Mon Feb 22, 2010 11:03 pm 
Offline
Regular Member

Joined: Tue Sep 09, 2008 10:28 pm
Posts: 199
finally I found some time to try out the work of pbg4 and I cross compiled a linux 2.6.29.6 kernel using his patches and tested on my spd8020 (LS-LGL)
The kernel seems to run ok but I encountered a problem.
In case you try to create a new folder in a large ext3 formatted partition it is getting out of memory problems. Sometimes it succeeds.
On a small partition like for instance 256 MB its ok but when trying this on a 500 GB partition it gets problems. No matter if you try to create the folder using smamba or ssh putty client. Below a example of the output visible on the serial console. Sometimes it takes long to recover from it so the box keeps busy trying to free memory, sometimes it takes forever.
Can one of the expert have a look at this output below , see last sentence there it mentions the mkdir command
Would appreciate if someone can help in finding a solution for this problem

Code:
httpd invoked oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=0
[<c002b988>] (dump_stack+0x0/0x14) from [<c00833dc>] (oom_kill_process+0x80/0x220)
[<c008335c>] (oom_kill_process+0x0/0x220) from [<c008396c>] (__out_of_memory+0x1b0/0x1d4)
[<c00837bc>] (__out_of_memory+0x0/0x1d4) from [<c0083ab0>] (out_of_memory+0x7c/0xcc)
[<c0083a34>] (out_of_memory+0x0/0xcc) from [<c0086260>] (__alloc_pages_internal+0x318/0x3cc)
r6:00000000 r5:001201d2 r4:00000000
[<c0085f48>] (__alloc_pages_internal+0x0/0x3cc) from [<c0088b28>] (__do_page_cache_readahead+0xfc/0x244)
[<c0088a2c>] (__do_page_cache_readahead+0x0/0x244) from [<c0088d80>] (do_page_cache_readahead+0x6c/0x7c)
[<c0088d14>] (do_page_cache_readahead+0x0/0x7c) from [<c0080eb0>] (filemap_fault+0x1d4/0x454)
r7:c11b9b00 r6:c1013a20 r5:00000000 r4:0011b140
[<c0080cdc>] (filemap_fault+0x0/0x454) from [<c00973b8>] (__do_fault+0x60/0x400)
[<c0097358>] (__do_fault+0x0/0x400) from [<c00979fc>] (handle_mm_fault+0x2a4/0x6f0)
[<c0097758>] (handle_mm_fault+0x0/0x6f0) from [<c02d8758>] (do_page_fault+0x150/0x294)
[<c02d8608>] (do_page_fault+0x0/0x294) from [<c02d88c0>] (do_translation_fault+0x24/0x88)
[<c02d889c>] (do_translation_fault+0x0/0x88) from [<c00272b4>] (do_PrefetchAbort+0x18/0x1c)
r5:00000000 r4:ffffffff
[<c002729c>] (do_PrefetchAbort+0x0/0x1c) from [<c02d6aa0>] (ret_from_exception+0x0/0x10)
Exception stack(0xc1073fb0 to 0xc1073ff8)
3fa0:                                     00000000 00000000 00000000 00000000
3fc0: be885ac0 00000000 00000000 00000001 00000001 0008403c 00084038 00083fec
3fe0: 00000000 be885aa0 40288a94 40288ab0 60000010 ffffffff
Mem-info:
Normal per-cpu:
CPU    0: hi:    0, btch:   1 usd:   0
Active_anon:1 active_file:474 inactive_anon:3
inactive_file:386 unevictable:0 dirty:0 writeback:0 unstable:0
free:127 slab:581 mapped:0 pagetables:72 bounce:0
Normal free:508kB min:508kB low:632kB high:760kB active_anon:4kB inactive_anon:12kB active_file:1896kB inactive_file:1544kB unevictable:0kB present:16192kB pages_scanned:2887 all_unreclaimable? no
lowmem_reserve[]: 0 0
Normal: 1*4kB 1*8kB 13*16kB 1*32kB 0*64kB 0*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 508kB
863 total pagecache pages
2 pages in swap cache
Swap cache stats: add 2434, delete 2432, find 400/527
Free swap  = 252276kB
Total swap = 257032kB
4096 pages of RAM
222 free pages
1072 reserved pages
417 slab pages
860 pages shared
2 pages swap cached
Out of memory: kill process 488 (httpd) score 2794 or a child
Killed process 488 (httpd)
nmbd invoked oom-killer: gfp_mask=0x1200d2, order=0, oomkilladj=0
[<c002b988>] (dump_stack+0x0/0x14) from [<c00833dc>] (oom_kill_process+0x80/0x220)
[<c008335c>] (oom_kill_process+0x0/0x220) from [<c008396c>] (__out_of_memory+0x1b0/0x1d4)
[<c00837bc>] (__out_of_memory+0x0/0x1d4) from [<c0083ab0>] (out_of_memory+0x7c/0xcc)
[<c0083a34>] (out_of_memory+0x0/0xcc) from [<c0086260>] (__alloc_pages_internal+0x318/0x3cc)
r6:00000000 r5:001200d2 r4:00000000
[<c0085f48>] (__alloc_pages_internal+0x0/0x3cc) from [<c00a1e60>] (read_swap_cache_async+0x50/0x128)
[<c00a1e10>] (read_swap_cache_async+0x0/0x128) from [<c00a1f8c>] (swapin_readahead+0x54/0x98)
r8:001200d2 r7:bee6f000 r6:c129b630 r5:00000548 r4:00000547
[<c00a1f38>] (swapin_readahead+0x0/0x98) from [<c0097a48>] (handle_mm_fault+0x2f0/0x6f0)
r8:c129b630 r7:000a8e00 r6:00000000 r5:000001bc r4:c11a5800
[<c0097758>] (handle_mm_fault+0x0/0x6f0) from [<c02d8758>] (do_page_fault+0x150/0x294)
[<c02d8608>] (do_page_fault+0x0/0x294) from [<c0027234>] (do_DataAbort+0x3c/0xa4)
[<c00271f8>] (do_DataAbort+0x0/0xa4) from [<c02d66cc>] (__dabt_svc+0x4c/0x60)
Exception stack(0xc07cbd68 to 0xc07cbdb0)
bd60:                   bee6f6f0 c07cbdf8 ffffffe4 00000000 00000004 00000001
bd80: c07ca000 00000000 bee6f6f0 00000000 00000000 c07cbf2c 0000001c c07cbdb4
bda0: 00000000 c0182bb0 00000013 ffffffff
r8:bee6f6f0 r7:00000000 r6:c07ca000 r5:c07cbd9c r4:ffffffff
[<c00b8a70>] (core_sys_select+0x0/0x3a8) from [<c00b8f00>] (sys_select+0xe8/0x208)
[<c00b8e18>] (sys_select+0x0/0x208) from [<c00279c0>] (ret_fast_syscall+0x0/0x2c)
Mem-info:
Normal per-cpu:
CPU    0: hi:    0, btch:   1 usd:   0
Active_anon:1 active_file:448 inactive_anon:1
inactive_file:412 unevictable:0 dirty:0 writeback:1 unstable:0
free:140 slab:581 mapped:0 pagetables:65 bounce:0
Normal free:560kB min:508kB low:632kB high:760kB active_anon:4kB inactive_anon:4kB active_file:1792kB inactive_file:1648kB unevictable:0kB present:16192kB pages_scanned:909 all_unreclaimable? no
lowmem_reserve[]: 0 0
Normal: 10*4kB 1*8kB 14*16kB 1*32kB 0*64kB 0*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 560kB
861 total pagecache pages
1 pages in swap cache
Swap cache stats: add 2443, delete 2442, find 400/528
Free swap  = 252412kB
Total swap = 257032kB
4096 pages of RAM
232 free pages
1072 reserved pages
417 slab pages
860 pages shared
1 pages swap cached
Out of memory: kill process 585 (smbd) score 844 or a child
Killed process 585 (smbd)
smbd: page allocation failure. order:0, mode:0x50
[<c002b988>] (dump_stack+0x0/0x14) from [<c00862fc>] (__alloc_pages_internal+0x3b4/0x3cc)
[<c0085f48>] (__alloc_pages_internal+0x0/0x3cc) from [<c0086384>] (__get_free_pages+0x24/0x5c)
[<c0086360>] (__get_free_pages+0x0/0x5c) from [<c010dff0>] (journal_get_undo_access+0x74/0x150)
[<c010df7c>] (journal_get_undo_access+0x0/0x150) from [<c01049a0>] (__ext3_journal_get_undo_access+0x28/0x5c)
r7:c06c8e00 r6:c02e4d6c r5:c1179a48 r4:c1513018
[<c0104978>] (__ext3_journal_get_undo_access+0x0/0x5c) from [<c00f4ec0>] (ext3_try_to_allocate_with_rsv+0x4c/0x510)
r7:c06c8e00 r6:00000000 r5:c137d180 r4:00000000
[<c00f4e74>] (ext3_try_to_allocate_with_rsv+0x0/0x510) from [<c00f5700>] (ext3_new_blocks+0x2ac/0x5c0)
[<c00f5454>] (ext3_new_blocks+0x0/0x5c0) from [<c00fa628>] (ext3_get_blocks_handle+0x434/0x9b8)
[<c00fa1f4>] (ext3_get_blocks_handle+0x0/0x9b8) from [<c00fb624>] (ext3_getblk+0x6c/0x1ec)
[<c00fb5b8>] (ext3_getblk+0x0/0x1ec) from [<c00fb7c0>] (ext3_bread+0x1c/0xa4)
[<c00fb7a4>] (ext3_bread+0x0/0xa4) from [<c00fe668>] (ext3_mkdir+0xdc/0x2c8)
r5:00000000 r4:00001000
[<c00fe58c>] (ext3_mkdir+0x0/0x2c8) from [<c00b4c18>] (vfs_mkdir+0x78/0xc8)
[<c00b4ba0>] (vfs_mkdir+0x0/0xc8) from [<c00b4d08>] (sys_mkdirat+0xa0/0xec)
r7:c16bff28 r6:c166e400 r5:000001ff r4:00000000
[<c00b4c68>] (sys_mkdirat+0x0/0xec) from [<c00b4d74>] (sys_mkdir+0x20/0x24)
r7:00000027 r6:bead4698 r5:000001ff r4:2a3dd738
[<c00b4d54>] (sys_mkdir+0x0/0x24) from [<c00279c0>] (ret_fast_syscall+0x0/0x2c)
Mem-info:
Normal per-cpu:
CPU    0: hi:    0, btch:   1 usd:   0
Active_anon:1 active_file:475 inactive_anon:1
inactive_file:431 unevictable:0 dirty:0 writeback:0 unstable:0
free:0 slab:592 mapped:0 pagetables:65 bounce:0
Normal free:0kB min:508kB low:632kB high:760kB active_anon:4kB inactive_anon:4kB active_file:1900kB inactive_file:1724kB unevictable:0kB present:16192kB pages_scanned:5629 all_unreclaimable? yes
lowmem_reserve[]: 0 0
Normal: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 0kB
919 total pagecache pages
1 pages in swap cache
Swap cache stats: add 2443, delete 2442, find 400/529
Free swap  = 252412kB
Total swap = 257032kB
4096 pages of RAM
92 free pages
1072 reserved pages
428 slab pages
930 pages shared
1 pages swap cached
journal_get_undo_access: No memory for committed data
ext3_try_to_allocate_with_rsv: aborting transaction: Out of memory in __ext3_journal_get_undo_access
EXT3-fs error (device sda6) in ext3_new_blocks: Out of memory
EXT3-fs error (device sda6) in ext3_reserve_inode_write: Readonly filesystem
EXT3-fs error (device sda6) in ext3_dirty_inode: Out of memory
EXT3-fs error (device sda6) in ext3_reserve_inode_write: Readonly filesystem
EXT3-fs error (device sda6) in ext3_reserve_inode_write: Readonly filesystem
EXT3-fs error (device sda6) in ext3_delete_inode: Out of memory
EXT3-fs error (device sda6) in ext3_mkdir: Out of memory


Top
 Profile  
 
PostPosted: Wed Mar 03, 2010 1:14 am 
Offline
Regular Member

Joined: Tue Sep 09, 2008 10:28 pm
Posts: 199
made some progress, found that the problem is that when trying to allocate a block in the file system it starts with an not suitable block and it then starts to search the other blocks one by one. It goes through a loop about 3000 times before it finds one. Thats the reason why it seems to hang. When using ext3 the journaling when being in the loop is filling the memory and causing the out of memory error. When using ext2 it just takes a long time to create a directory (1 to 20 seconds). This problem only happens when creating a sub directory on a large partition, in this case a partition with size of 500 GB. Need to find out the reason why it starts with a good block number when making a directory in the root of the partion and why not when making a sub directory

Any tips are welcome

Kernel is 2.6.33


Top
 Profile  
 
PostPosted: Thu Mar 04, 2010 10:57 pm 
Offline
Regular Member

Joined: Tue Sep 09, 2008 10:28 pm
Posts: 199
seems I was able to find a solution.
The newer versions of the linux kernel seems to have some changes in the ext2 and ext3 file system drivers. They skipped a check that made a routine that is trying to find new blocks to make a new directory go to the the end of a loop and then skipping some functions that needs cpu power and memory when the group of blocks under investigation was not suitable. Maybe at newer system with faster cpu's and more memory you will never notice it as a problem. Only it takes a little longer to create a directory on a big partition. In case of the spd8020 it caused problems, on ext3 an OOM error (as result of the journalling) and aborting the creation of the directory, and in ext2 a long delay in creating the directory.
The problem only happened on bigger partitions and when creating a sub directory outside the root of the partition. It then started with a slightly to high group number and then loop through all groups to find a good syuitable one. As there are 4000 groups this can take a while in case there are cpu and memory intensive check done for each group.
I added a check that was made in earlier versions of the kernel to skip a part of the function that takes time and memory when the group of blocks is not suitable, and that did the job, now it works ok in ext3 (no OOM error anymore) and creating the directory in less then a second.
The error is in the file balloc.c in fs/ext3 (and fs/ext2) folder. Below the part of the code with the fix, the fix is in line 117-120 (the lines in between the marks /* fvdw */, the function causing the OOM and long time delay is in line 137 (ext3_try_to_allocate_with_rsv). With this fix that part is skipped when the group is not suitable.

I have now a 2.6.33 kernel running on spd8020 (LS-LGL)... :up:

Code:
ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode,
         ext3_fsblk_t goal, unsigned long *count, int *errp)
{
   struct buffer_head *bitmap_bh = NULL;
   struct buffer_head *gdp_bh;
   int group_no;
   int goal_group;
   ext3_grpblk_t grp_target_blk;   /* blockgroup relative goal block */
   ext3_grpblk_t grp_alloc_blk;   /* blockgroup-relative allocated block*/
   ext3_fsblk_t ret_block;      /* filesyetem-wide allocated block */
   int bgi;         /* blockgroup iteration index */
   int fatal = 0, err;
   int performed_allocation = 0;
   ext3_grpblk_t free_blocks;   /* number of free blocks in a group */
   struct super_block *sb;
   struct ext3_group_desc *gdp;
   struct ext3_super_block *es;
   struct ext3_sb_info *sbi;
   struct ext3_reserve_window_node *my_rsv = NULL;
   struct ext3_block_alloc_info *block_i;
   unsigned short windowsz = 0;
#ifdef EXT3FS_DEBUG
   static int goal_hits, goal_attempts;
#endif
   unsigned long ngroups;
   unsigned long num = *count;

   *errp = -ENOSPC;
   sb = inode->i_sb;
   if (!sb) {
      printk("ext3_new_block: nonexistent device");
      return 0;
   }

   /*
    * Check quota for allocation of this block.
    */
   if (vfs_dq_alloc_block(inode, num)) {
      *errp = -EDQUOT;
      return 0;
   }

   sbi = EXT3_SB(sb);
   es = EXT3_SB(sb)->s_es;
   ext3_debug("goal=%lu.\n", goal);
   /*
    * Allocate a block from reservation only when
    * filesystem is mounted with reservation(default,-o reservation), and
    * it's a regular file, and
    * the desired window size is greater than 0 (One could use ioctl
    * command EXT3_IOC_SETRSVSZ to set the window size to 0 to turn off
    * reservation on that particular file)
    */
   block_i = EXT3_I(inode)->i_block_alloc_info;
   if (block_i && ((windowsz = block_i->rsv_window_node.rsv_goal_size) > 0))
      my_rsv = &block_i->rsv_window_node;

   if (!ext3_has_free_blocks(sbi)) {
      *errp = -ENOSPC;
      goto out;
   }

   /*
    * First, test whether the goal block is free.
    */
   if (goal < le32_to_cpu(es->s_first_data_block) ||
       goal >= le32_to_cpu(es->s_blocks_count))
      goal = le32_to_cpu(es->s_first_data_block);
   group_no = (goal - le32_to_cpu(es->s_first_data_block)) /
         EXT3_BLOCKS_PER_GROUP(sb);
   goal_group = group_no;
retry_alloc:
   gdp = ext3_get_group_desc(sb, group_no, &gdp_bh);
   if (!gdp)
      goto io_error;

   free_blocks = le16_to_cpu(gdp->bg_free_blocks_count);
   /*
    * if there is not enough free blocks to make a new resevation
    * turn off reservation for this allocation
    */
   if (my_rsv && (free_blocks < windowsz)
      && (free_blocks > 0)
      && (rsv_is_empty(&my_rsv->rsv_window)))
      my_rsv = NULL;

   if (free_blocks > 0) {
      grp_target_blk = ((goal - le32_to_cpu(es->s_first_data_block)) %
            EXT3_BLOCKS_PER_GROUP(sb));
      bitmap_bh = read_block_bitmap(sb, group_no);
      if (!bitmap_bh)
         goto io_error;
      grp_alloc_blk = ext3_try_to_allocate_with_rsv(sb, handle,
               group_no, bitmap_bh, grp_target_blk,
               my_rsv,   &num, &fatal);
      if (fatal)
         goto out;
      if (grp_alloc_blk >= 0)
         goto allocated;
   }

   ngroups = EXT3_SB(sb)->s_groups_count;
   smp_rmb();

   /*
    * Now search the rest of the groups.  We assume that
    * group_no and gdp correctly point to the last group visited.
    */
   for (bgi = 0; bgi < ngroups; bgi++) {
      group_no++;
      if (group_no >= ngroups)
         group_no = 0;
      gdp = ext3_get_group_desc(sb, group_no, &gdp_bh);
      if (!gdp)
         goto io_error;

/* fvdw*/
   if (!gdp->bg_free_blocks_count)
      continue;
/* fvdw */
      free_blocks = le16_to_cpu(gdp->bg_free_blocks_count);
      /*
       * skip this group if the number of
       * free blocks is less than half of the reservation
       * window size.
       */
      if (my_rsv && (free_blocks <= (windowsz/2)))
         continue;

      brelse(bitmap_bh);
      bitmap_bh = read_block_bitmap(sb, group_no);
      if (!bitmap_bh)
         goto io_error;
      /*
       * try to allocate block(s) from this group, without a goal(-1).
       */
      grp_alloc_blk = ext3_try_to_allocate_with_rsv(sb, handle,
               group_no, bitmap_bh, -1, my_rsv,
               &num, &fatal);
      if (fatal)
         goto out;
      if (grp_alloc_blk >= 0)
         goto allocated;
   }
   /*
    * We may end up a bogus ealier ENOSPC error due to
    * filesystem is "full" of reservations, but
    * there maybe indeed free blocks avaliable on disk
    * In this case, we just forget about the reservations
    * just do block allocation as without reservations.
    */
   if (my_rsv) {
      my_rsv = NULL;
      windowsz = 0;
      group_no = goal_group;
      goto retry_alloc;
   }
   /* No space left on the device */
   *errp = -ENOSPC;
   goto out;

allocated:

   ext3_debug("using block group %d(%d)\n",
         group_no, gdp->bg_free_blocks_count);

   BUFFER_TRACE(gdp_bh, "get_write_access");
   fatal = ext3_journal_get_write_access(handle, gdp_bh);
   if (fatal)
      goto out;

   ret_block = grp_alloc_blk + ext3_group_first_block_no(sb, group_no);

   if (in_range(le32_to_cpu(gdp->bg_block_bitmap), ret_block, num) ||
       in_range(le32_to_cpu(gdp->bg_inode_bitmap), ret_block, num) ||
       in_range(ret_block, le32_to_cpu(gdp->bg_inode_table),
            EXT3_SB(sb)->s_itb_per_group) ||
       in_range(ret_block + num - 1, le32_to_cpu(gdp->bg_inode_table),
            EXT3_SB(sb)->s_itb_per_group)) {
      ext3_error(sb, "ext3_new_block",
             "Allocating block in system zone - "
             "blocks from "E3FSBLK", length %lu",
              ret_block, num);
      /*
       * claim_block() marked the blocks we allocated as in use. So we
       * may want to selectively mark some of the blocks as free.
       */
      goto retry_alloc;
   }


Top
 Profile  
 
PostPosted: Sat Mar 06, 2010 8:05 am 
Offline
Regular Member

Joined: Mon Oct 15, 2007 5:21 am
Posts: 141
@fvdw
Did you report this fix to the lkml mailing list or the ext3 maintainer?


Top
 Profile  
 
PostPosted: Sat Mar 06, 2010 10:55 am 
Offline
Regular Member

Joined: Tue Sep 09, 2008 10:28 pm
Posts: 199
no not yet, but its a good idea, I will send them an e-mail today

Are you an experienced programmer ? what do you think is this fix ok, so far it works flawless


Top
 Profile  
 
PostPosted: Sat Mar 06, 2010 11:31 pm 
Offline
Regular Member

Joined: Tue Sep 09, 2008 10:28 pm
Posts: 199
here the boot log as proof its running on LS-LGL 6082 based board using the orion git
There are still some issues as the name of the ethernet interface, in the old kernel it was egiga0 , now its eth0, need to adapt that in the NAS database setting. Also powerup and reset buttons do not work yet, the power led I can swithc on or of, still need to find how to set blinking of the other led. Also spindown function of the harddisk needs to be updated, but for the rest it looks good.

Code:
Bootstrap 02.09
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
_   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/    |____/ \___/ \___/ \__|  ** LOADER **
** MARVELL BOARD: RD-88F6082-NAS-PH LE

U-Boot 1.1.4 (Apr 10 2007 - 14:27:58) Marvell version: 2.3.9_2-TINY

U-Boot code: 00200000 -> 0023EE00  BSS: -> 0024CF30

Soc: MV88F6082 Rev 1 (DDR1)
CPU running @ 333Mhz
SysClock = 166Mhz , TClock = 133Mhz

DRAM CS[0] base 0x00000000   size   8MB
DRAM CS[1] base 0x01000000   size   8MB
DRAM Total size  16MB  16bit width
[256kB@f8100000] Flash: 256 kB
Addresses 4M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (4M - 3M): Done

CPU : ARM926 (Rev 0)

USB 0: host mode
PCI 0: PCI Express Root Complex Interface
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found




ext2load ide 0:2 1000000 /boot/uImage

1876144 bytes read
bootm 1000000
## Booting image at 01000000 ...
   Image Name:   Linux-2.6.33
   Created:      2010-03-05  22:26:01 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1876080 Bytes =  1.8 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.33 (root@linux-fw1) (gcc version 4.2.0 20070413 (prerelease) (CodeSourcery Sourcery G++ Lite

2007q1-21)) #34 PREEMPT Fri Mar 5 23:25:45 CET 2010
CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=a0053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Philips NAS SPD8020 CC
Clearing invalid memory bank 0KB@0x00000000
Clearing invalid memory bank 0KB@0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x41000403
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4048
Kernel command line: console=ttyS0,115200 devicetype=SPD8020 serial=AS110805009602 temp=45,50 root=/dev/sda2 ro
PID hash table entries: 64 (order: -4, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 8MB 8MB = 16MB total
Memory: 12284KB available (3576K code, 216K data, 124K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:64
Calibrating delay loop... 218.72 BogoMIPS (lpj=1093632)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Orion ID: MV88F6082-Rev-A1. TCLK=133333333.
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource orion_clocksource
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
msgmni has been set to 23
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) is a 16550A
console [ttyS0] enabled
loop: module loaded
sata_mv sata_mv.0: version 1.28
sata_mv sata_mv.0: slots 32 ports 1
scsi0 : sata_mv
ata1: SATA max UDMA/133 irq 29
physmap platform flash device: 00040000 at f8100000
physmap-flash physmap-flash.0: map_probe failed
MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
net eth0: port 0 with MAC address 00:90:3e:7e:ca:cb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 17, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
input: gpio-keys as /class/input/input0
i2c /dev entries driver
rtc-ds1307 0-0068: rtc core: registered ds1338 as rtc0
rtc-ds1307 0-0068: 56 bytes nvram
Registered led device: power:blue
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
VFP support v0.3: not present
rtc-ds1307 0-0068: setting system clock to 2009-03-05 22:10:58 UTC (1236291058)
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.00: ATA-8: Hitachi HDP725050GLA360, GM4OA52A, max UDMA/133
ata1.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access     ATA      Hitachi HDP72505 GM4O PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 sda3 sda4 < sda5 sda6 >
sd 0:0:0:0: [sda] Attached SCSI disk
EXT3-fs (sda2): mounted filesystem with ordered data mode
VFS: Mounted root (ext3 filesystem) readonly on device 8:2.
Freeing init memory: 124K
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sda2): warning: maximal mount count reached, running e2fsck is recommended
EXT3-fs (sda2): using internal journal
EXT3-fs (sda5): warning: maximal mount count reached, running e2fsck is recommended
kjournald starting.  Commit interval 5 seconds

EXT3-fs (sda5): using internal journal
EXT3-fs (sda5): recovery complete
EXT3-fs (sda5): mounted filesystem with ordered data mode
Setting up swapspace version 1, size = 263204864 bytes
Adding 257032k swap on /dev/sda3.  Priority:-1 extents:1 across:257032k
inserting kernel modules:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/pdo.so' -

/usr/lib/php/extensions/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
cat: /proc/scsi/sg/devices: No such file or directory
cat: /proc/scsi/sg/devices: No such file or directory
* Initial Orion-Nas XML configuration file...           [ OK ]
* Generating Hosts File...                              [ OK ]
* Configuring System Hostname...                        [ OK ]
* Configuring System Users...                                  [ OK ]
* Configuring Loopback Interface...                     [ OK ]
* Configuring Samba...                                  [ OK ]
* Configuring LAN interface... API[2009/03/05 23:11:14] laniffunc_configure.finc(82)[396]: laniffunc_configure

ifconfig -a  egiga0 169.254.15.217 FAILED!
API[2009/03/05 23:11:14] laniffunc_configure.finc(103)[396]: laniffunc_configure ifconfig egiga0 up FAILED!
cannot start udhcpc process.
* Starting udevd...                                     [ OK ]
* Configuring Disks...                                  [ OK ]
* Starting mount of volumes...
   - Mounting volume Default:
EXT3-fs (sda6):
kjournald starting.  Commit interval 5 seconds
warning: mounting unchecked fs, running e2fsck is recommended
EXT3-fs (sda6): using internal journal
EXT3-fs (sda6): recovery complete
EXT3-fs (sda6): mounted filesystem with ordered data mode
                                                         [ OK ]
* Finishing mount of volumes...                         [ OK ]
* Starting web server...                                [ OK ]
* Initializing Timezone...                              [ OK ]
* Starting NTP client...                                [ OK ]
* Configuring Samba...                                  [ OK ]
* Starting dropbear...                                  [ OK ]
* Starting syncawayd...                                 [ OK ]
* No Media Server...,QOSd...  * Starting fanctld...                                     [ OK ]
* Starting btnsctld...                                          [ OK ]
* Starting Marvell Discovery Daemon... program fanctld is using a deprecated SCSI ioctl, please convert it to

SG_IO
                                 [ OK ]
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/pdo.so' -

/usr/lib/php/extensions/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
ifconfig: egiga0: error fetching interface information: Device not found

BusyBox v1.01 (2008.01.03-20:00+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ #


Last edited by fvdw on Sun Mar 07, 2010 11:57 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Mar 07, 2010 2:19 am 
Offline
Newbie

Joined: Mon May 25, 2009 4:11 pm
Posts: 30
fvdw wrote:
no not yet, but its a good idea, I will send them an e-mail today

Are you an experienced programmer ? what do you think is this fix ok, so far it works flawless


Report it to the kernel mailing list. I haven't seen this yet on my linkstation pro yet. However, I have only been running a 2.6.33 kernel for a short time now.


Top
 Profile  
 
PostPosted: Thu Mar 11, 2010 6:00 pm 
Offline
Regular Member

Joined: Tue Sep 09, 2008 10:28 pm
Posts: 199
deb wrote:
fvdw wrote:
no not yet, but its a good idea, I will send them an e-mail today

Are you an experienced programmer ? what do you think is this fix ok, so far it works flawless


Report it to the kernel mailing list. I haven't seen this yet on my linkstation pro yet. However, I have only been running a 2.6.33 kernel for a short time now.


edit--- got an aswer today


Top
 Profile  
 
PostPosted: Sun Mar 28, 2010 12:11 am 
Offline
Regular Member

Joined: Tue Sep 09, 2008 10:28 pm
Posts: 199
today I compiled the 2.6.33.1 kernel, it runs smoothly

even got the leds doing what I want now. The only thing left is that the reboot command doesn't work
It tries to restart the kernel but after some time it gives up and just halt the system mentioning restarting failed.

Think a certain gpio pin must be set to make it reboot instead of halt


Top
 Profile  
 
PostPosted: Sat Apr 03, 2010 11:38 pm 
Offline
Regular Member

Joined: Tue Sep 09, 2008 10:28 pm
Posts: 199
well got everything sorted

getting the HDD led blink with HDD activity, it is a sata disk by the way..., getting the HDD spin down function working after some time of inactivity, switching leds on or of or let them blink, I know now how to get the buttons working and how to get the fan switched on and off when HDD temp is asking for it.....and finally also the reboot problem, now I can also reboot it from the command line. :p
Al this had little or nothing to do with the kernel itself it was all a matter of finding the right setup of GPIO pins of this device and adding some functions and putting it in a setup file in the mach-orion5x folder for this device. It sounds simple but I can tell you it was a hell of job as nothing is documented for this system board, trial and error takes time


Top
 Profile  
 
PostPosted: Sun Apr 04, 2010 12:10 pm 
Offline
Moderator

Joined: Fri Jun 29, 2007 10:39 am
Posts: 1271
Will you document your stuff somewhere (maybe in the
Wiki of this forum)?

_________________
Please do not use PN to ask questions. Use the proper forum instead.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 55 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Protected by Anti-Spam ACP
Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group