What's the mean of FMODE_EXCL?

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

 



Hi all:
	Today, i wrote to a partition which already mounted using dd.So the fs was destroyed completedly.
So i asked why dd can write? I remembed the flag O_EXCL which prevent other operation.
I review the code and found it used FMODE_EXCL.But why dd can write?
In open(2):
>             In  general,  the  behavior  of  O_EXCL is undefined if it is used without O_CREAT.  There is one
>             exception: on Linux 2.6 and later, O_EXCL can be used without O_CREAT if  pathname  refers  to  a
>              block device.  If the block device is in use by the system (e.g., mounted), open() fails with the
>              error EBUSY.
 But understand from the literal meaning, EXCL means opened exclusively.I think it like mutex-operation.
Can someone please tell me why?

Thanks!
Jianpeng?韬{.n?????%??檩??w?{.n???{饼?z鳐??骅w*jg????????G??⒏⒎?:+v????????????"??????


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux