예제 #1
0
static int show_bitmap(struct seq_file *m, void *unused)
{
	struct super_block *sb = m->private;
	struct reiserfs_sb_info *r = REISERFS_SB(sb);

	seq_printf(m, "free_block: %lu\n"
		   "  scan_bitmap:"
		   "          wait"
		   "          bmap"
		   "         retry"
		   "        stolen"
		   "  journal_hint"
		   "journal_nohint"
		   "\n"
		   " %14lu"
		   " %14lu"
		   " %14lu"
		   " %14lu"
		   " %14lu"
		   " %14lu"
		   " %14lu"
		   "\n",
		   SFP(free_block),
		   SFPF(call),
		   SFPF(wait),
		   SFPF(bmap),
		   SFPF(retry),
		   SFPF(stolen),
		   SFPF(in_journal_hint), SFPF(in_journal_nohint));

	return 0;
}
예제 #2
0
int reiserfs_bitmap_in_proc( char *buffer, char **start, off_t offset,
			     int count, int *eof, void *data )
{
	struct super_block *sb;
	struct reiserfs_sb_info *r = &sb->u.reiserfs_sb;
	int len = 0;
    
	sb = procinfo_prologue( ( kdev_t ) ( long ) data );
	if( sb == NULL )
		return -ENOENT;
	r = &sb->u.reiserfs_sb;

	len += sprintf( &buffer[ len ], "free_block: %lu\n"
			"  scan_bitmap:"
			"          wait"
			"          bmap"
			"         retry"
			"        stolen"
			"  journal_hint"
			"journal_nohint"
			"\n"
			" %14lu"
			" %14lu"
			" %14lu"
			" %14lu"
			" %14lu"
			" %14lu"
			" %14lu"
			"\n",
			SFP( free_block ),
			SFPF( call ), 
			SFPF( wait ), 
			SFPF( bmap ),
			SFPF( retry ),
			SFPF( stolen ),
			SFPF( in_journal_hint ),
			SFPF( in_journal_nohint ) );

	procinfo_epilogue( sb );
	return reiserfs_proc_tail( len, buffer, start, offset, count, eof );
}
예제 #3
0
static PyObject* superluWrappersSparseFactorSolve(PyObject* self,
                                                PyObject* args)
{
  trans_t trans=TRANS;
  int info=0;
  PyObject *sparseFactor,*x;
  if(!PyArg_ParseTuple(args,"OO",
                       &sparseFactor,
                       &x))
    return NULL;
  SFP(sparseFactor)->storeX.nzval = DDATA(x);
  dgstrs(trans,
         &SFP(sparseFactor)->L,
         &SFP(sparseFactor)->U,
         SFP(sparseFactor)->perm_c,
         SFP(sparseFactor)->perm_r,
         &SFP(sparseFactor)->X,
         &SFP(sparseFactor)->stat,
         &info);
  Py_INCREF(Py_None); 
  return Py_None;
}
예제 #4
0
int reiserfs_super_in_proc( char *buffer, char **start, off_t offset,
			    int count, int *eof, void *data )
{
	struct super_block *sb;
	struct reiserfs_sb_info *r;
	int len = 0;
    
	sb = procinfo_prologue( ( kdev_t ) ( long ) data );
	if( sb == NULL )
		return -ENOENT;
	r = &sb->u.reiserfs_sb;
	len += sprintf( &buffer[ len ], 
			"state: \t%s\n"
			"mount options: \t%s%s%s%s%s%s%s%s%s%s%s%s\n"
			"gen. counter: \t%i\n"
			"s_kmallocs: \t%i\n"
			"s_disk_reads: \t%i\n"
			"s_disk_writes: \t%i\n"
			"s_fix_nodes: \t%i\n"
			"s_do_balance: \t%i\n"
			"s_unneeded_left_neighbor: \t%i\n"
			"s_good_search_by_key_reada: \t%i\n"
			"s_bmaps: \t%i\n"
			"s_bmaps_without_search: \t%i\n"
			"s_direct2indirect: \t%i\n"
			"s_indirect2direct: \t%i\n"
			"\n"
			"max_hash_collisions: \t%i\n"

			"breads: \t%lu\n"
			"bread_misses: \t%lu\n"

			"search_by_key: \t%lu\n"
			"search_by_key_fs_changed: \t%lu\n"
			"search_by_key_restarted: \t%lu\n"
			
			"insert_item_restarted: \t%lu\n"
			"paste_into_item_restarted: \t%lu\n"
			"cut_from_item_restarted: \t%lu\n"
			"delete_solid_item_restarted: \t%lu\n"
			"delete_item_restarted: \t%lu\n"

			"leaked_oid: \t%lu\n"
			"leaves_removable: \t%lu\n",

			SF( s_mount_state ) == REISERFS_VALID_FS ?
			"REISERFS_VALID_FS" : "REISERFS_ERROR_FS",
			reiserfs_r5_hash( sb ) ? "FORCE_R5 " : "",
			reiserfs_rupasov_hash( sb ) ? "FORCE_RUPASOV " : "",
			reiserfs_tea_hash( sb ) ? "FORCE_TEA " : "",
			reiserfs_hash_detect( sb ) ? "DETECT_HASH " : "",
			reiserfs_no_border( sb ) ? "NO_BORDER " : "BORDER ",
			reiserfs_no_unhashed_relocation( sb ) ? "NO_UNHASHED_RELOCATION " : "",
			reiserfs_hashed_relocation( sb ) ? "UNHASHED_RELOCATION " : "",
			reiserfs_test4( sb ) ? "TEST4 " : "",
			have_large_tails( sb ) ? "TAILS " : have_small_tails(sb)?"SMALL_TAILS ":"NO_TAILS ",
			replay_only( sb ) ? "REPLAY_ONLY " : "",
			reiserfs_dont_log( sb ) ? "DONT_LOG " : "LOG ",
			convert_reiserfs( sb ) ? "CONV " : "",

			atomic_read( &r -> s_generation_counter ),
			SF( s_kmallocs ),
			SF( s_disk_reads ),
			SF( s_disk_writes ),
			SF( s_fix_nodes ),
			SF( s_do_balance ),
			SF( s_unneeded_left_neighbor ),
			SF( s_good_search_by_key_reada ),
			SF( s_bmaps ),
			SF( s_bmaps_without_search ),
			SF( s_direct2indirect ),
			SF( s_indirect2direct ),
			SFP( max_hash_collisions ),
			SFP( breads ),
			SFP( bread_miss ),
			SFP( search_by_key ),
			SFP( search_by_key_fs_changed ),
			SFP( search_by_key_restarted ),

			SFP( insert_item_restarted ),
			SFP( paste_into_item_restarted ),
			SFP( cut_from_item_restarted ),
			SFP( delete_solid_item_restarted ),
			SFP( delete_item_restarted ),

			SFP( leaked_oid ),
			SFP( leaves_removable ) );

	procinfo_epilogue( sb );
	return reiserfs_proc_tail( len, buffer, start, offset, count, eof );
}
예제 #5
0
static PyObject* superluWrappersSparseFactorPrepare(PyObject* self,
                                                    PyObject* args)
{
  int i,n,relax=1,panel_size=10,lwork=0,info=0,permc_spec=3;
  double drop_tol=-1.0;/* not used by superlu */
  void *work=NULL;
  PyObject *mat,*sparseFactor;
  if(!PyArg_ParseTuple(args,"OO",
                       &mat,
                       &sparseFactor))
    return NULL;
  SFP(sparseFactor)->storeA.nnz = ((SparseMatrix*)mat)->A.nnz;
  SFP(sparseFactor)->storeA.nzval = ((SparseMatrix*)mat)->A.nzval;
  SFP(sparseFactor)->storeA.colptr = ((SparseMatrix*)mat)->A.rowptr;
  SFP(sparseFactor)->storeA.rowind = ((SparseMatrix*)mat)->A.colind;
  /* calc column permutation */
  if ( SFP(sparseFactor)->use_same_perm_c == 0)
    {
      get_perm_c(permc_spec, 
                 &SFP(sparseFactor)->A, 
                 SFP(sparseFactor)->perm_c);
      SFP(sparseFactor)->use_same_perm_c = 1;
    }
  if ( SFP(sparseFactor)->use_same_sparsity == 0)
    {
      if (SFP(sparseFactor)->AC.Store  != NULL)
        {
          Destroy_CompCol_Permuted(&SFP(sparseFactor)->AC);
          Destroy_SuperNode_Matrix(&SFP(sparseFactor)->L);
          Destroy_CompCol_Matrix(&SFP(sparseFactor)->U);
        }
      /* apply column permutation and build AC and etree*/
      sp_preorder(&SFP(sparseFactor)->options, 
                  &SFP(sparseFactor)->A, 
                  SFP(sparseFactor)->perm_c, 
                  SFP(sparseFactor)->etree, 
                  &SFP(sparseFactor)->AC);
      SFP(sparseFactor)->use_same_sparsity = 1;
    }
  else
    {
      /* apply column permutation */
      SFP(sparseFactor)->options.Fact = SamePattern_SameRowPerm;
      n = SFP(sparseFactor)->A.ncol;
      for (i = 0; i < n; i++) 
        {
          ((NCPformat*)SFP(sparseFactor)->AC.Store)->colbeg[SFP(sparseFactor)->perm_c[i]] = ((NCformat*)SFP(sparseFactor)->A.Store)->colptr[i]; 
          ((NCPformat*)SFP(sparseFactor)->AC.Store)->colend[SFP(sparseFactor)->perm_c[i]] = ((NCformat*)SFP(sparseFactor)->A.Store)->colptr[i+1];
        }
    }
  dgstrf(&SFP(sparseFactor)->options,
         &SFP(sparseFactor)->AC,
         relax,
         panel_size,
         SFP(sparseFactor)->etree,
         work,
         lwork,
         SFP(sparseFactor)->perm_c,
         SFP(sparseFactor)->perm_r,
         &SFP(sparseFactor)->L,
         &SFP(sparseFactor)->U,
	 &SFP(sparseFactor)->Glu,
         &SFP(sparseFactor)->stat,
         &info);
  Py_INCREF(Py_None); 
  return Py_None;
}
예제 #6
0
static int show_super(struct seq_file *m, void *unused)
{
	struct super_block *sb = m->private;
	struct reiserfs_sb_info *r = REISERFS_SB(sb);

	seq_printf(m, "state: \t%s\n"
		   "mount options: \t%s%s%s%s%s%s%s%s%s%s%s\n"
		   "gen. counter: \t%i\n"
		   "s_disk_reads: \t%i\n"
		   "s_disk_writes: \t%i\n"
		   "s_fix_nodes: \t%i\n"
		   "s_do_balance: \t%i\n"
		   "s_unneeded_left_neighbor: \t%i\n"
		   "s_good_search_by_key_reada: \t%i\n"
		   "s_bmaps: \t%i\n"
		   "s_bmaps_without_search: \t%i\n"
		   "s_direct2indirect: \t%i\n"
		   "s_indirect2direct: \t%i\n"
		   "\n"
		   "max_hash_collisions: \t%i\n"
		   "breads: \t%lu\n"
		   "bread_misses: \t%lu\n"
		   "search_by_key: \t%lu\n"
		   "search_by_key_fs_changed: \t%lu\n"
		   "search_by_key_restarted: \t%lu\n"
		   "insert_item_restarted: \t%lu\n"
		   "paste_into_item_restarted: \t%lu\n"
		   "cut_from_item_restarted: \t%lu\n"
		   "delete_solid_item_restarted: \t%lu\n"
		   "delete_item_restarted: \t%lu\n"
		   "leaked_oid: \t%lu\n"
		   "leaves_removable: \t%lu\n",
		   SF(s_mount_state) == REISERFS_VALID_FS ?
		   "REISERFS_VALID_FS" : "REISERFS_ERROR_FS",
		   reiserfs_r5_hash(sb) ? "FORCE_R5 " : "",
		   reiserfs_rupasov_hash(sb) ? "FORCE_RUPASOV " : "",
		   reiserfs_tea_hash(sb) ? "FORCE_TEA " : "",
		   reiserfs_hash_detect(sb) ? "DETECT_HASH " : "",
		   reiserfs_no_border(sb) ? "NO_BORDER " : "BORDER ",
		   reiserfs_no_unhashed_relocation(sb) ?
		   "NO_UNHASHED_RELOCATION " : "",
		   reiserfs_hashed_relocation(sb) ? "UNHASHED_RELOCATION " : "",
		   reiserfs_test4(sb) ? "TEST4 " : "",
		   have_large_tails(sb) ? "TAILS " : have_small_tails(sb) ?
		   "SMALL_TAILS " : "NO_TAILS ",
		   replay_only(sb) ? "REPLAY_ONLY " : "",
		   convert_reiserfs(sb) ? "CONV " : "",
		   atomic_read(&r->s_generation_counter),
		   SF(s_disk_reads), SF(s_disk_writes), SF(s_fix_nodes),
		   SF(s_do_balance), SF(s_unneeded_left_neighbor),
		   SF(s_good_search_by_key_reada), SF(s_bmaps),
		   SF(s_bmaps_without_search), SF(s_direct2indirect),
		   SF(s_indirect2direct), SFP(max_hash_collisions), SFP(breads),
		   SFP(bread_miss), SFP(search_by_key),
		   SFP(search_by_key_fs_changed), SFP(search_by_key_restarted),
		   SFP(insert_item_restarted), SFP(paste_into_item_restarted),
		   SFP(cut_from_item_restarted),
		   SFP(delete_solid_item_restarted), SFP(delete_item_restarted),
		   SFP(leaked_oid), SFP(leaves_removable));

	return 0;
}