Hello, I am new to this group and I apologize if these issues have already been addressed. I am somewhat confused about what is or is not supported in terms of locking, and any help would be greatly appreciated! 1) Is fcntl currently supported? 2) Can locking be disabled on a per file basis? 3) Can client-side caching be disabled on a per file basis? 4) Is O_DIRECT supported at the application level? Thanks very much! Phil Dickens
Phil Dickens wrote:> > Hello, > > I am new to this group and I apologize if these issues have > already been addressed. I am somewhat confused about what is > or is not supported in terms of locking, and any help would > be greatly appreciated! > > 1) Is fcntl currently supported?Yes, it works, but see e.g. here https://bugzilla.lustre.org/show_bug.cgi?id=12542 https://bugzilla.lustre.org/show_bug.cgi?id=12802> 2) Can locking be disabled on a per file basis?I don''t think so.> 3) Can client-side caching be disabled on a per file basis?I don''t think so.> 4) Is O_DIRECT supported at the application level?Works for me. Cheers, Bernd
On Thu, 2007-07-05 at 20:36 +0200, Bernd Schubert wrote:> > > 4) Is O_DIRECT supported at the application level? > > Works for me. > >using mixed normal and O_DIRECT access need to be sure fixes from bugs 11662 and 12371 is applied. -- Alexey Lyashkov <shadow@clusterfs.com> Beaver team, Cluster filesystem
Hi Bernd, I appreciate your getting back to me so quickly. Does anyone else know for sure whether locking and client-side caching can be disabled on a per file basis? Many thanks! Phil Dickens On Thu, 5 Jul 2007, Bernd Schubert wrote:> Phil Dickens wrote: > >> >> Hello, >> >> I am new to this group and I apologize if these issues have >> already been addressed. I am somewhat confused about what is >> or is not supported in terms of locking, and any help would >> be greatly appreciated! >> >> 1) Is fcntl currently supported? > > Yes, it works, but see e.g. here > https://bugzilla.lustre.org/show_bug.cgi?id=12542 > https://bugzilla.lustre.org/show_bug.cgi?id=12802 > >> 2) Can locking be disabled on a per file basis? > > I don''t think so. > >> 3) Can client-side caching be disabled on a per file basis? > > I don''t think so. > >> 4) Is O_DIRECT supported at the application level? > > Works for me. > > > Cheers, > Bernd > > _______________________________________________ > Lustre-discuss mailing list > Lustre-discuss@clusterfs.com > https://mail.clusterfs.com/mailman/listinfo/lustre-discuss >
> anyone else know for sure whether locking and client-side > caching can be disabled on a per file basis?What do *you* mean by locking and caching? Lustre is a POSIX compliant filesystem. This requires locking during systemcalls. These locks are cached on the client until revoked by a server. You could probably set the number of locks keept on the client to zero but this will kill performance. This setting is pr. filesystem not filelevel. fcntl locking is advisory locking of single files across systemcalls and is completely orthogonal to intra-systemcall locking. /Jakob
On Thu, 5 Jul 2007, Jakob Goldbach wrote:>> anyone else know for sure whether locking and client-side >> caching can be disabled on a per file basis? > > What do *you* mean by locking and caching? > > Lustre is a POSIX compliant filesystem. This requires locking during > systemcalls. These locks are cached on the client until revoked by a > server. > > You could probably set the number of locks keept on the client to zero > but this will kill performance. This setting is pr. filesystem not > filelevel. > > fcntl locking is advisory locking of single files across systemcalls > and is completely orthogonal to intra-systemcall locking. > > /Jakob >I am interested in disabling locking and client-side caching so that the application itself can provide its own enforcement of file consistency semantics and provide its own caching. I understand that Lustre is a POSIX-compliant system; what I am unsure of is whether the locking and caching system that provides such compliance can be disabled on a per file basis. --pmd
On Jul 05, 2007 16:59 -0400, Phil Dickens wrote:> I am interested in disabling locking and client-side caching so that > the application itself can provide its own enforcement of file consistency > semantics and provide its own caching. I understand that Lustre is a > POSIX-compliant system; what I am unsure of is whether the locking and > caching system that provides such compliance can be disabled on a > per file basis.In fact it can - use ioctl(fd, LL_IOC_SETFLAGS, LL_FILE_IGNORE_LOCK). The file needs to be opened with O_DIRECT in order to do this. This mode was added ages ago to test a similar usage but is never tested, use at own risk (though reports of success/failure are still of interest). Cheers, Andreas -- Andreas Dilger Principal Software Engineer Cluster File Systems, Inc.
Many thanks for clearing this up for me Andreas!! Phil Dickens On Thu, 5 Jul 2007, Andreas Dilger wrote:> On Jul 05, 2007 16:59 -0400, Phil Dickens wrote: >> I am interested in disabling locking and client-side caching so that >> the application itself can provide its own enforcement of file consistency >> semantics and provide its own caching. I understand that Lustre is a >> POSIX-compliant system; what I am unsure of is whether the locking and >> caching system that provides such compliance can be disabled on a >> per file basis. > > In fact it can - use ioctl(fd, LL_IOC_SETFLAGS, LL_FILE_IGNORE_LOCK). > The file needs to be opened with O_DIRECT in order to do this. This > mode was added ages ago to test a similar usage but is never tested, > use at own risk (though reports of success/failure are still of interest). > > Cheers, Andreas > -- > Andreas Dilger > Principal Software Engineer > Cluster File Systems, Inc. >