From: Marco Stornelli <hidden> Date: 2012-08-16 10:00:10
From: Marco Stornelli <redacted>
Remove lock and unlock super operation.
Signed-off-by: Marco Stornelli <redacted>
---
diff -Nurp linux-3.6-rc1-orig/fs/exofs/super.c linux-3.6-rc1/fs/exofs/super.c
Are you sure? It used to be that exofs_sync_fs() could be called
concurrently.
What about two "bash -c sync" calls or a sync and an unmount
in parallel. anything protecting that?
If so then sure, but please let me test first.
Boaz
Are you sure? It used to be that exofs_sync_fs() could be called
concurrently.
What about two "bash -c sync" calls or a sync and an unmount
in parallel. anything protecting that?
If so then sure, but please let me test first.
Umm, actually we will probably end up writing the same twice without the
lock.
--
Best Regards,
Artem Bityutskiy
Are you sure? It used to be that exofs_sync_fs() could be called
concurrently.
What about two "bash -c sync" calls or a sync and an unmount
in parallel. anything protecting that?
If so then sure, but please let me test first.
Umm, actually we will probably end up writing the same twice without the
lock.
No we are not allowed to run exofs_sync_fs() concurrently because it uses
a per-alllocated scratch buffer to do it's stuff so you can end up with data
corruption on disk.
And we cannot use a spin-lock because we might sleep in ore_write()
There are some optimizations I can do here, but lets for now just do
the sb->s_lock thing, and I might decide to completely revamp the
all thing later.
Thanks
Boaz
Are you sure? It used to be that exofs_sync_fs() could be called
concurrently.
What about two "bash -c sync" calls or a sync and an unmount
in parallel. anything protecting that?
If so then sure, but please let me test first.
Umm, actually we will probably end up writing the same twice without the
lock.
No we are not allowed to run exofs_sync_fs() concurrently because it uses
a per-alllocated scratch buffer to do it's stuff so you can end up with data
corruption on disk.
I take that back. We kmalloc. (We used to not too).
In theory the counter in question could change mid flight and the IOs can
be submitted out of order, But the chance for that is very very slim. So
It's fine. It's a deprecated counter anyway, so I'm OK to drop it.
I'll completely remove it the next time I increment the sb version
number.
Thanks
Boaz
And we cannot use a spin-lock because we might sleep in ore_write()
There are some optimizations I can do here, but lets for now just do
the sb->s_lock thing, and I might decide to completely revamp the
all thing later.
Thanks
Boaz
On Thu, 2012-08-16 at 16:15 +0300, Boaz Harrosh wrote:
quoted
There are some optimizations I can do here, but lets for now just do
the sb->s_lock thing, and I might decide to completely revamp the
all thing later.
OK. But I guess an exofs-specific mutex could be used instead. We do not
have to depend on 'sb->s_lock'.
sorry I meant sbi->s_lock. But I'm fine with the complete drop now
Thanks
Boaz
On Thu, 2012-08-16 at 16:15 +0300, Boaz Harrosh wrote:
There are some optimizations I can do here, but lets for now just do
the sb->s_lock thing, and I might decide to completely revamp the
all thing later.
OK. But I guess an exofs-specific mutex could be used instead. We do not
have to depend on 'sb->s_lock'.
--
Best Regards,
Artem Bityutskiy
Are you sure? It used to be that exofs_sync_fs() could be called
concurrently.
What about two "bash -c sync" calls or a sync and an unmount
in parallel. anything protecting that?
If so then sure, but please let me test first.
Boaz
.
Yes Boaz, I agree, it's the reason I asked for a comments for exofs and
hpfs. The only reason to have a lock here is to serialize operations in
parallel on the same super block.
Marco