Andrew Morton wrote:Ok, I've modified sync_inodes_sb() so that I can pass it my own wbc, where I set wcb->nr_to_write = 20. It gives me _exactly_ what I want. It just flushes a bit more then 20 pages and returns. I use WB_SYNC_ALL. Great! Now I would like to understand why it works :-) To my surprise, it does not deadlock! I call it from ->prepare_write where I'm holding i_mutex, and it works just fine. It calls ->writepage() without trying to lock i_mutex! This looks like some witchcraft for me. This means that if I'm in the middle of an operation or ino #X, I own its i_mutex, but not I_LOCK, I can be preempted and ->writepage can be called for a dirty page belonging to this inode #X? I haven't seen this in practice and I do not believe this may happen. Why? Could you or someone please give me a hint what exactly inode->i_flags & I_LOCK protects? What is its relationship to i_mutex? -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -
| Junio C Hamano | [ANNOUNCE] GIT 1.6.0 |
| Linus Torvalds | Re: [ANNOUNCE] mdb: Merkey's Linux Kernel Debugger 2.6.27-rc4 released |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Paul Menage | Re: [RFC][PATCH 6/7] Account for the number of tasks within container |
git: | |
| Nicolas Pitre | Re: pack operation is thrashing my server |
| Scott Chacon | Git Community Book |
| Greg KH | Re: [ANNOUNCE] pg - A patch porcelain for GIT |
| Lars Hjemli | [PATCH] git-merge: add option --no-ff |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Nick Guenther | Re: Real men don't attack straw men |
| Travers Buda | Re: Important OpenBSD errata |
| Gregory Edigarov | How to re-build openssl with SHA1 support? |
| Al Boldi | [RFC] VM: I have a dream... |
| Dave Kleikamp | Re: [RFC] Heads up on sys_fallocate() |
| Jörn | Review status (Re: [PATCH] LogFS take three) |
| Chris Mason | [ANNOUNCE] Btrfs v0.12 released |
