linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to implement "filesystem operations tracker"?
@ 2013-09-20 16:39 Anatol Pomozov
  2013-09-20 16:44 ` Kirill A. Shutemov
  2013-09-20 18:43 ` Vyacheslav Dubeyko
  0 siblings, 2 replies; 7+ messages in thread
From: Anatol Pomozov @ 2013-09-20 16:39 UTC (permalink / raw)
  To: linux-fsdevel

Hi,

I have a following requirement: I start a process that performs a lot
of filesystem operations. And I need to know what files my process was
using - I need a breakdown by read operations and write operations.

A real-world example where such requirement needed is build-systems -
I run "gcc foo.c" and I want to know what files are dependencies of
this operation. I want to record the information and if any of
dependencies is modified - I rerun "gcc" again.

There are build systems that track dependencies by mounting by-pass
fuse filesystem and chrooting() there. e.g. tup
https://github.com/gittup/tup  But fuse is relatively slow and it
introduces additional buffer copy. I do not want to copy data to
user-space and back, all I need is to record what files were
stat()/open().

Is there a light-weight mechanism that allows to perform it?

If not then I think of a simple filesystem that implements stat/open
and bypasses all other operations to underlying filesystem
implementation. stat/open information is saved and later userspace can
receive this information e.g. via device file. Does this idea sound
sane?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-21  0:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-20 16:39 How to implement "filesystem operations tracker"? Anatol Pomozov
2013-09-20 16:44 ` Kirill A. Shutemov
2013-09-20 18:00   ` Anatol Pomozov
2013-09-21  0:38     ` Tetsuo Handa
2013-09-20 18:43 ` Vyacheslav Dubeyko
2013-09-20 18:48   ` Anatol Pomozov
2013-09-20 19:15     ` Vyacheslav Dubeyko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).