An intent is a piece of data supplied with a lock enqueue indicating special processing is needed during lock enqueue, and the data themselves are the parameters for that processing. Namespaces can have different intent handlers defined for such processing.
The intent feature allows the caller of namei and lookup to pass some information about what they want to accomplish in the end. The net effect of this is a reduced number of RPC requests when interacting with the MDS.
A intent is defined as follows (inode.h):
Six intention operations are defined (encoded in int_opmask). These are get attributes, set attributes, insert or delete, open, create, and read links.
An RPC made by an OST or MDT to another system, usually a client, to indicate to that an extent lock it is holding should be surrendered if it is not in use. If the system is using the lock, then the system should report the object size in the reply to the glimpse callback. Glimpses are introduced to optimize the acquisition of file sizes.
Glimpse is the optimal method to get file size during active IO.
In layman language,
If I setup a Dr.'s appointment, I can give them my phone number, so they can call me the day before to confirm the appointment. A callback is like that, except instead of just being a phone number, it can be arbitrary instructions like "send me an email at this address, and also call my secretary and have her put it in my calendar. [from stackoverflow