Irrigation tubing will not hold back water to the full depth of its diameter. A 22-inch diameter tube may give you only 16 inches of protection. You can get a little higher protection by filling a second tube behind the first one, then laying a third tube in the groove formed by the first two tubes. Brace the lower tubes so they don't separate, and be sure you've closed the ends of the lower tubes securely. Put the tubes in place before you fill them.
Don't stack these tubes higher than two deep. The added weight will increase the pressure in the lower tubes and may cause them to rupture. For protection over 2 feet, use water-inflated dams or other systems.