->journal_info sharing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Stephen,

It seem that in the presence of several jornalling file systems in the
kernel some mechanism is needed for proper sharing of the ->journal_info
pointer in the task_struct.

One journalled file system can indirectly call another during page fault
in copy_from_user, quota file modification, or

__alloc_pages()->balance_classzone()->shrink_cache()->vm_writeback()

sequence. (Actually, I don't understand when prevents ext3 from
re-entering itself in such a case.)

Can we replace 

struct task_struct {
  ...
  void *journal_info;
};

with 

struct fs_activation;

struct fs_activation {
  struct super_block   *super;
  struct fs_activation *parent;
};

struct task_struct {
  ...
  struct fs_activation *journal_info;
};

Such that each file system can store original ->journal_info in the
->parent field and restore it on exit.

All fs_activation for nested file system calls are then chained through
->parent's and file system can easily check whether it is already in the
call chain, etc.

Of course, fs_activation will be actually embedded into file system
specific data structure (handle_t for ext3, reiser4_context for reiser4).

Does this make sense?

Nikita.



_______________________________________________

Ext3-users@redhat.com
https://listman.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux