Here's some short commentary on the controversy:
Lutheran Study Bible
Quirinius … governor of Syria. May have held this office twice and conducted a census in each term. First, when Jesus was born, and then in AD 6–9
EHV Study Bible
Or this was the first census, taken before Quirinius was governor of Syria. There is much debate about the grammatical construction of this sentence and about the identification and date of this census. The point of Luke’s remark seems to be to distinguish this census from a more well-known census undertaken during the governorship of Quirinius in about 6 AD (Acts 5:37). There is insufficient information available to pinpoint the year of the census in Luke 2 or Quirinius’s role in it. Commentaries and chronologies should be consulted for arguments for and against the various views.
Here's some more comprehensive commentary:
Lenski's commentary
This, a first enrollment for taxing, occurred while Quirinius (this is the proper spelling) was governing in Syria.
This simple statement of Luke’s has had to bear the brunt of attack, and it did seem as if Luke might have erred. Quirinius was the governor of Syria in A.D. 6 and made an enrollment for taxation at this time, the one mentioned by Luke himself in Acts 5:37 and by Josephus in Antiquities 18, 1, 1. Luke was charged with misdating this enrollment by erroneously transferring it and the governorship of Quirinius from A.D. 6 to B.C. 8. What helped the matter were the mistaken statements of Josephus (on which see Zahn in his commentary on Luke). The word of the renegade Jewish priest Josephus, born as late as 37 or 38 A.D., was accepted in preference to the word of Paul’s faithful assistant, the inspired writer Luke, who was an active member in the church at Antioch as early as the year 40. Recently discovered inscriptions vindicate Luke.
Publius Sulpicius Quirinius was the regular governor in Syria during A.D. 6, when, after the death of Archelaus, a census for taxation was made, which treated Palestine as an ordinary Roman province and thus caused the formation of the militant Jewish party of Zealots, to whom the apostle Simon “the zealot” once belonged (Luke 6:15; Acts 1:13). This party continued until the fall of Jerusalem; the fate of its founder is recorded in Acts 5:37. But Quirinius functioned in Syria during B.C. 7 and after that date, not indeed as regular governor of the province but in a governing capacity. We do not translate ἡγεμονεύοντος “being governor,” i.e., having that ordinary office, but “governing,” i.e., acting in a governing capacity. In other words, at the time of Jesus’ birth somewhere near the year 6 B.C. Varus, who was afterward so thoroughly defeated by the Germans, was the governor of Syria and administered its regular affairs. Let us remember that Herod the Great died in the spring of 4 B.C., and that Jesus was born a year or two before his death (Matt. 2). While Varus was governor, Quirinius controlled the armies and directed the foreign policy of Syria. It was thus that he supervised the enrollment for taxation also in the kingdom of Herod. When Tertullian makes Sentius Saturnius the governor of Syria (B.C. 9–6) instead of Varus, this is a mistake since all indications point to a delay in the execution of the imperial decree in Palestine so that the work began in this part of the realm when Varus held the governorship.
The genitive absolute, “Quirinius governing in Syria,” is not so much a date as a statement regarding the control of the enrollment for taxation. Acting in a governing capacity in Syria, and having broader powers than those of the regular governor, Quirinius managed the enrollment also in Herod’s domain. Herod’s standing with the emperor was not that of a rex socius. He was not king in his own right but was dependent on the φιλία Καίσαρος, was one of the amici Cæsaris who were dependent on the amicitia of the emperor. How easily Herod might have forfeited the emperor’s favor is shown by Josephus, Antiquities 16, 9, 3, where the emperor reprimands Herod for his war with the Arabians and tells him that he formerly used him as a friend (φίλος) but will now use him as a subject (ὑπήκοος). The view that no personal representative of the emperor could supervise the taxing in Herod’s domain is an unwarranted conclusion. We do not know what delayed the matter in Palestine. Some think of a reluctance on Herod’s part, and others suppose an alacrity on Herod’s part because he desired the emperor’s favor. It is not safe to guess. Whether we omit ἡ and read: “this as the first enrollment,” or retain it: “this first enrollment,” makes little difference; but “first” means, not that other enrollments followed, but that nothing of the kind had ever been decreed in the past.[