Re: Need to intercept open&write calls for vdi file when VirtualBox is working.

Previous thread: [PATCH -mmotm] pagemap: add #ifdefs CONFIG_HUGETLB_PAGE on code walking hugetlb vma by Naoya Horiguchi on Tuesday, March 23, 2010 - 10:42 pm. (1 message)

Next thread: [BUGFIX][PATCH] fix race in file_mapped accounting in memcg by KAMEZAWA Hiroyuki on Tuesday, March 23, 2010 - 11:43 pm. (3 messages)
From: Sergey Malykhin
Date: Tuesday, March 23, 2010 - 11:04 pm

Hi,

My problem - I have to intercept open&write function calls to .vdi file
when VirtualBox is working to control which sectors of vdi file were
changed, i.e. I need to get 1. what file was open for writing; 2. data
from buffer; 3. size of data; 4. offset in file;

I tryed: 
          - LD_PRELOAD - not helped

          - using fuse - rewrote write call and successfully
intercepted, but fuse is slow.

I have possibilities to patch ext3 or patch inotify.

Is there any better way to do it?

TIA


--

From: David Newall
Date: Tuesday, March 23, 2010 - 11:52 pm

Sergey,

Perhaps btrfs, or similar, would be a good starting point.

David
--

Previous thread: [PATCH -mmotm] pagemap: add #ifdefs CONFIG_HUGETLB_PAGE on code walking hugetlb vma by Naoya Horiguchi on Tuesday, March 23, 2010 - 10:42 pm. (1 message)

Next thread: [BUGFIX][PATCH] fix race in file_mapped accounting in memcg by KAMEZAWA Hiroyuki on Tuesday, March 23, 2010 - 11:43 pm. (3 messages)